-- filtro por vendedor.
This commit is contained in:
@@ -3292,7 +3292,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
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
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet")
|
DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet")
|
||||||
|
|
||||||
@@ -3302,6 +3302,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CvesVendedores", SqlDbType.Int).Value = CvesVendedores
|
||||||
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -170,6 +170,10 @@
|
|||||||
<label class="col-md-1">Cliente: </label>
|
<label class="col-md-1">Cliente: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" selectedindexchange="DdlClientes_SelectedIndexChanged"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 truncate">Vendedor:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1">Estatus: </label>
|
<label class="col-md-1">Estatus: </label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Partial Class RepCotizacionesxFacturar
|
Partial Class RepCotizacionesxFacturar
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
|
||||||
|
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
Private Property FechaI As String
|
Private Property FechaI As String
|
||||||
@@ -55,9 +53,7 @@ Partial Class RepCotizacionesxFacturar
|
|||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
txtFechaI.Text = NowADS().ToShortDateString
|
txtFechaI.Text = NowADS().ToShortDateString
|
||||||
txtFechaF.Text = NowADS().ToShortDateString
|
txtFechaF.Text = NowADS().ToShortDateString
|
||||||
|
CargaCombos()
|
||||||
CargaSucursales()
|
|
||||||
CargaCliente()
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
OrdenaDatos()
|
OrdenaDatos()
|
||||||
|
|
||||||
@@ -73,8 +69,9 @@ Partial Class RepCotizacionesxFacturar
|
|||||||
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
|
|
||||||
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
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
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
@@ -121,7 +118,7 @@ Partial Class RepCotizacionesxFacturar
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "CARGA COMBOS FILTRO"
|
#Region "CARGA COMBOS FILTRO"
|
||||||
Private Sub CargaCliente()
|
Private Sub CargaCombos()
|
||||||
'CargaClientes
|
'CargaClientes
|
||||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
If EsWS Then
|
If EsWS Then
|
||||||
@@ -133,8 +130,17 @@ Partial Class RepCotizacionesxFacturar
|
|||||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
'Vendedor
|
||||||
Private Sub CargaSucursales()
|
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.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyectos.DataBind()
|
DdlSubProyectos.DataBind()
|
||||||
|
|||||||
Reference in New Issue
Block a user