diff --git a/Ventas/RepRecuperacion.aspx.vb b/Ventas/RepRecuperacion.aspx.vb
index 0e4839d3c..85efd930c 100644
--- a/Ventas/RepRecuperacion.aspx.vb
+++ b/Ventas/RepRecuperacion.aspx.vb
@@ -108,6 +108,13 @@ Partial Class Ventas_RepRecuperacion
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
txtFechaF.Text = Now.ToShortDateString
+
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
+ lblEsDistribuidor.Visible = True
+ divEsDistribuidor.Visible = True
+ End If
+
+ UPFiltros.Update()
End Sub
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,
"-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
DtDatos = ObjMovtos.DtResultados
Else
@@ -159,15 +167,15 @@ Partial Class Ventas_RepRecuperacion
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"),
- 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
- 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"),
- 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
diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx
index 6d0e2e6fd..9de83215a 100644
--- a/Ventas/RepRecuperacionDetalle.aspx
+++ b/Ventas/RepRecuperacionDetalle.aspx
@@ -94,6 +94,7 @@
+
@@ -177,6 +178,14 @@
+
+
+
+
+
+
+
+
diff --git a/Ventas/RepRecuperacionDetalle.aspx.vb b/Ventas/RepRecuperacionDetalle.aspx.vb
index 39e1769c2..61fe62f14 100644
--- a/Ventas/RepRecuperacionDetalle.aspx.vb
+++ b/Ventas/RepRecuperacionDetalle.aspx.vb
@@ -7,8 +7,8 @@ Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports System.IO
Partial Class Ventas_RepRecuperacionDetalle
- Inherits ClsPaginas
-
+ Inherits ClsPaginas
+
#Region "Propiedades"
Public Property Iva() As String
Get
@@ -60,18 +60,28 @@ Partial Class Ventas_RepRecuperacionDetalle
Set(value As Integer)
ViewState("Tipo") = value
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
-
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaDatos()
End If
- End Sub
-
+ End Sub
+
#Region "CARGAS"
-
+
Private Sub CargaCombos()
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer
@@ -153,7 +163,8 @@ Partial Class Ventas_RepRecuperacionDetalle
TxtEspecifico.Text = IfNull(Request("TCEspecifico"), "").ToString
CveMoneda = IfNull(Request("CveMoneda"), "-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'
Dim ObjCliente As New ClsClientes
@@ -196,8 +207,13 @@ Partial Class Ventas_RepRecuperacionDetalle
RblTipoCambio.SelectedValue = TipoCambio
DdlMoneda.SelectedValueExist(If(TipoCambio.ToEntero > 1, -1, CveMoneda))
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
Public Sub CargaDatos()
@@ -211,7 +227,8 @@ Partial Class Ventas_RepRecuperacionDetalle
DdlClienteSucursal.SelectedValue.ToEntero, -1,
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,
- 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
DtDatos = ObjMovtos.DtResultados
@@ -234,12 +251,12 @@ Partial Class Ventas_RepRecuperacionDetalle
End If
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCuentaBancaria.DataBind()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "GRIDVIEW"
-
+
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -259,18 +276,18 @@ Partial Class Ventas_RepRecuperacionDetalle
e.Row.Cells(8).Text = ""
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "SELECTED INDEX CHANGE"
-
+
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaCuentas()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "IMPRESIONES"
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
Imprimir("PDF")
@@ -318,10 +335,10 @@ Partial Class Ventas_RepRecuperacionDetalle
Else
Alert("No hay datos consultados.", TipoMensaje.MsgAdvertencia)
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs)
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
LiEspecifico.Visible = True