Reporte Recuperacion, agregar filtro de Distribuidor . opciones de Todos, Distribuidor y no distribuior, esta visualización solo aplica si es empresa acumuladores

This commit is contained in:
2021-01-18 00:06:59 -07:00
parent 2204677a81
commit fd91c8d243
4 changed files with 73 additions and 30 deletions

View File

@@ -99,6 +99,7 @@
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem> <asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem> <asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem> <asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -168,6 +169,14 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distrubuidor:</label>
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -108,6 +108,13 @@ Partial Class Ventas_RepRecuperacion
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
lblEsDistribuidor.Visible = True
divEsDistribuidor.Visible = True
End If
UPFiltros.Update()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
@@ -120,7 +127,8 @@ Partial Class Ventas_RepRecuperacion
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados
Else Else
@@ -159,15 +167,15 @@ Partial Class Ventas_RepRecuperacion
End If End If
End If End If
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}", Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}",
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"))
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4 e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}", Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}",
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"))
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5 e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5

View File

@@ -94,6 +94,7 @@
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem> <asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem> <asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem> <asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -177,6 +178,14 @@
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label id="lblEsDistribuidor" runat="server" visible="false" class="col-md-1 truncate">Es Distrubuidor:</label>
<div class="col-md-2" id="divEsDistribuidor" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -7,8 +7,8 @@ Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports System.IO Imports System.IO
Partial Class Ventas_RepRecuperacionDetalle Partial Class Ventas_RepRecuperacionDetalle
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
Public Property Iva() As String Public Property Iva() As String
Get Get
@@ -60,18 +60,28 @@ Partial Class Ventas_RepRecuperacionDetalle
Set(value As Integer) Set(value As Integer)
ViewState("Tipo") = value ViewState("Tipo") = value
End Set End Set
End Property End Property
Private Property EsDistribuidor As Integer
Get
Return ViewState("EsDistribuidor").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("EsDistribuidor") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CargaCombos() CargaCombos()
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
#Region "CARGAS" #Region "CARGAS"
Private Sub CargaCombos() Private Sub CargaCombos()
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto, Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer
@@ -153,7 +163,8 @@ Partial Class Ventas_RepRecuperacionDetalle
TxtEspecifico.Text = IfNull(Request("TCEspecifico"), "").ToString TxtEspecifico.Text = IfNull(Request("TCEspecifico"), "").ToString
CveMoneda = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero CveMoneda = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero
CveClienteClasificacion = IfNull(Request("CveClienteClasificacion"), "-1").ToString.ToEntero CveClienteClasificacion = IfNull(Request("CveClienteClasificacion"), "-1").ToString.ToEntero
Tipo = IfNull(Request("Tipo"), "-1").ToString.ToEntero Tipo = IfNull(Request("Tipo"), "-1").ToString.ToEntero
EsDistribuidor = IfNull(Request("EsDistribuidor"), "-1").ToString.ToEntero
'Carga Clasificacion Cliente' 'Carga Clasificacion Cliente'
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
@@ -196,8 +207,13 @@ Partial Class Ventas_RepRecuperacionDetalle
RblTipoCambio.SelectedValue = TipoCambio RblTipoCambio.SelectedValue = TipoCambio
DdlMoneda.SelectedValueExist(If(TipoCambio.ToEntero > 1, -1, CveMoneda)) DdlMoneda.SelectedValueExist(If(TipoCambio.ToEntero > 1, -1, CveMoneda))
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion) DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal) DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
DdlDistribuidor.SelectedValueExist(EsDistribuidor)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
lblEsDistribuidor.Visible = True
divEsDistribuidor.Visible = True
End If
End Sub End Sub
Public Sub CargaDatos() Public Sub CargaDatos()
@@ -211,7 +227,8 @@ Partial Class Ventas_RepRecuperacionDetalle
DdlClienteSucursal.SelectedValue.ToEntero, -1, DdlClienteSucursal.SelectedValue.ToEntero, -1,
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero, Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo, DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo) Then TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados
@@ -234,12 +251,12 @@ Partial Class Ventas_RepRecuperacionDetalle
End If End If
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1")) DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCuentaBancaria.DataBind() DdlCuentaBancaria.DataBind()
End Sub End Sub
#End Region #End Region
#Region "GRIDVIEW" #Region "GRIDVIEW"
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -259,18 +276,18 @@ Partial Class Ventas_RepRecuperacionDetalle
e.Row.Cells(8).Text = "" e.Row.Cells(8).Text = ""
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "SELECTED INDEX CHANGE" #Region "SELECTED INDEX CHANGE"
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaCuentas() CargaCuentas()
End Sub End Sub
#End Region #End Region
#Region "IMPRESIONES" #Region "IMPRESIONES"
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
Imprimir("PDF") Imprimir("PDF")
@@ -318,10 +335,10 @@ Partial Class Ventas_RepRecuperacionDetalle
Else Else
Alert("No hay datos consultados.", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados.", TipoMensaje.MsgAdvertencia)
End If End If
End Sub End Sub
#End Region #End Region
Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs)
If RblTipoCambio.SelectedValue.ToEntero = 3 Then If RblTipoCambio.SelectedValue.ToEntero = 3 Then
LiEspecifico.Visible = True LiEspecifico.Visible = True