From 90c3a09e538449c788725a0c6a73a48ae131f5b9 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Sun, 7 Feb 2021 19:04:40 -0700 Subject: [PATCH 1/8] Cambio en reporte de recuperacion detalle para aplicar el filtro de fechaaplicado --- App_Code/ClsMovimientos.vb | 9 ++++++-- Ventas/RepRecuperacion.aspx.vb | 15 +++++++------- Ventas/RepRecuperacionDetalle.aspx | 30 +++++++++++++++++++++++++++ Ventas/RepRecuperacionDetalle.aspx.vb | 14 +++++++++++-- 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 9ea0c4866..3672bca91 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -1517,7 +1517,7 @@ Public Class ClsMovimientos Optional CveCuenta As Integer = -1, Optional Grupo As String = "-1", Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveMoneda As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional Tipo As Integer = -1, - Optional EsDistribuidor As Integer = -1) As Boolean + Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing) As Boolean Dim Retorno As Boolean = False @@ -1546,7 +1546,12 @@ Public Class ClsMovimientos .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@Tipo", SqlDbType.Int).Value = Tipo - .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + + + .Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString + .Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString + End With Try diff --git a/Ventas/RepRecuperacion.aspx.vb b/Ventas/RepRecuperacion.aspx.vb index d6303d9a0..c3c3b4e99 100644 --- a/Ventas/RepRecuperacion.aspx.vb +++ b/Ventas/RepRecuperacion.aspx.vb @@ -158,11 +158,12 @@ Partial Class Ventas_RepRecuperacion Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim Css As String = "Texto" - Dim FechaI, FechaF As String + Dim FechaI, FechaF, FechaAplicadoI, FechaAplicadoF As String Dim CveClienteSucursal As Integer = -1 FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") - FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") - + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + FechaAplicadoI = If(IsDate(TxtFechaAplicadoI.Text.Trim()), TxtFechaAplicadoI.Text.Trim(), MinFecha.ToShortDateString.ToString) + FechaAplicadoF = If(IsDate(TxtFechaAplicadoF.Text.Trim()), TxtFechaAplicadoF.Text.Trim(), MaxFecha.ToShortDateString.ToString) If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" End If @@ -174,15 +175,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}&EsDistribuidor={19}", + 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}&FechaAplicadoI={20}&FechaAplicadoF={21}", 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("EsDistribuidor")) + 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"), FechaAplicadoI, FechaAplicadoF) 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}&EsDistribuidor={19}", + 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}&FechaAplicadoI={20}&FechaAplicadoF={21}", 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("EsDistribuidor")) + 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"), FechaAplicadoI, FechaAplicadoF) e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5 diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx index b674b640d..7a854146b 100644 --- a/Ventas/RepRecuperacionDetalle.aspx +++ b/Ventas/RepRecuperacionDetalle.aspx @@ -186,6 +186,36 @@ +
Fecha Inicio:
+
+
+ + + + +
+ + + + + + +
+
Fecha Fin:
+
+
+ + + + +
+ + + + + + +
diff --git a/Ventas/RepRecuperacionDetalle.aspx.vb b/Ventas/RepRecuperacionDetalle.aspx.vb index 586baddf7..76a99761f 100644 --- a/Ventas/RepRecuperacionDetalle.aspx.vb +++ b/Ventas/RepRecuperacionDetalle.aspx.vb @@ -85,7 +85,7 @@ Partial Class Ventas_RepRecuperacionDetalle Private Sub CargaCombos() Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto, CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer - Dim FechaI, FechaF, TipoDocto, TipoCambio As String + Dim FechaI, FechaF, TipoDocto, TipoCambio, FechaAplicadoI, FechaAplicadoF As String 'Carga Clientes If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then @@ -144,7 +144,17 @@ Partial Class Ventas_RepRecuperacionDetalle End If If FechaI <> "-1" Then txtFechaI.Text = FechaI + End If + + FechaAplicadoI = If(Request("FechaAplicadoI") IsNot Nothing, Request("FechaAplicadoI").ToString, "-1").ToString + FechaAplicadoF = If(Request("FechaAplicadoF") IsNot Nothing, Request("FechaAplicadoF").ToString, "-1").ToString + If FechaAplicadoF <> "-1" Then + TxtFechaAplicadoF.Text = FechaAplicadoF End If + If FechaAplicadoI <> "-1" Then + TxtFechaAplicadoI.Text = FechaAplicadoI + End If + TipoDocto = IfNull(Request("TipoDocto"), "-1").ToString CveClienteSucursal = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero @@ -229,7 +239,7 @@ Partial Class Ventas_RepRecuperacionDetalle 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, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero()) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=TxtFechaAplicadoI.Text.ToDate, FechaAplicadoF:=TxtFechaAplicadoF.Text.ToDate) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados From efbbc45fc2b6158ab7499a330e659e64ed0c2282 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Mon, 8 Feb 2021 10:21:36 -0700 Subject: [PATCH 2/8] Cambio titulos para el filtro de fecha aplicado --- Ventas/RepRecuperacion.aspx | 4 ++-- Ventas/RepRecuperacionDetalle.aspx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ventas/RepRecuperacion.aspx b/Ventas/RepRecuperacion.aspx index 502929933..977e05630 100644 --- a/Ventas/RepRecuperacion.aspx +++ b/Ventas/RepRecuperacion.aspx @@ -179,7 +179,7 @@ -
Fecha Inicio:
+
Fecha Aplicado Inicio:
@@ -194,7 +194,7 @@
-
Fecha Fin:
+
Fecha Aplicado Fin:
diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx index 7a854146b..a4b0ca3b5 100644 --- a/Ventas/RepRecuperacionDetalle.aspx +++ b/Ventas/RepRecuperacionDetalle.aspx @@ -186,7 +186,7 @@
-
Fecha Inicio:
+
Fecha Aplicado Inicio:
@@ -201,7 +201,7 @@
-
Fecha Fin:
+
Fecha Aplicado Fin:
From 2f1fd335b869112cbd25262ee1f44b7a677f29af Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Fri, 12 Feb 2021 02:04:16 -0700 Subject: [PATCH 3/8] Agregar la funcion de Devolucion automatica en la cancelacion de compras --- Compras/Compras.aspx | 6 ++++ Compras/Compras.aspx.vb | 77 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 66bddceac..283f3403f 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -3217,6 +3217,12 @@
+
+ +
+ +
+