diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index 99877e120..180e2b830 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -3292,7 +3292,7 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional CveEstatusFactura As Integer = -1) As Boolean
+ Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CvesVendedores As String, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional CveEstatusFactura As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet")
@@ -3302,6 +3302,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CvesVendedores", SqlDbType.Int).Value = CvesVendedores
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
End With
diff --git a/Ventas/RepCotizacionesxFacturar.aspx b/Ventas/RepCotizacionesxFacturar.aspx
index f475fb070..276429a95 100644
--- a/Ventas/RepCotizacionesxFacturar.aspx
+++ b/Ventas/RepCotizacionesxFacturar.aspx
@@ -170,6 +170,10 @@
+
+
+
+
diff --git a/Ventas/RepCotizacionesxFacturar.aspx.vb b/Ventas/RepCotizacionesxFacturar.aspx.vb
index 6f734ab3f..754cd2c6f 100644
--- a/Ventas/RepCotizacionesxFacturar.aspx.vb
+++ b/Ventas/RepCotizacionesxFacturar.aspx.vb
@@ -2,11 +2,9 @@
Option Strict On
Imports System.Data
-Imports Microsoft.Reporting.WebForms
Imports Extensiones
Partial Class RepCotizacionesxFacturar
Inherits ClsPaginas
- Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES"
Private Property FechaI As String
@@ -55,9 +53,7 @@ Partial Class RepCotizacionesxFacturar
If Not Page.IsPostBack Then
txtFechaI.Text = NowADS().ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
-
- CargaSucursales()
- CargaCliente()
+ CargaCombos()
CargaDatos()
OrdenaDatos()
@@ -73,8 +69,9 @@ Partial Class RepCotizacionesxFacturar
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
+ Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
- If ObjVentas.GetRepCotizacionesSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveEstatusFactura:=DdlEstatusFactura.SelectedValue.ToEntero) Then
+ If ObjVentas.GetRepCotizacionesSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveEstatusFactura:=DdlEstatusFactura.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
GvDatos.DataBind()
@@ -121,7 +118,7 @@ Partial Class RepCotizacionesxFacturar
#End Region
#Region "CARGA COMBOS FILTRO"
- Private Sub CargaCliente()
+ Private Sub CargaCombos()
'CargaClientes
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
@@ -133,8 +130,17 @@ Partial Class RepCotizacionesxFacturar
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
- End Sub
- Private Sub CargaSucursales()
+ 'Vendedor
+ DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
+ DdlVendedor.DataBind()
+ DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
+ DdlVendedor.Items.Insert(1, New ListItem("Sin Vendedor", "-2"))
+
+ If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
+ DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString())
+ DdlVendedor.Attributes.Add("disabled", "disabled")
+ DdlVendedor.Enabled = False
+ End If
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectos.DataBind()