From 4da010f3b9574911865a6c8eab5489b0d1a31ffd Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 24 Nov 2020 13:50:14 -0700 Subject: [PATCH] Resumen de usados --- App_Code/ClsAcumuladores.vb | 25 ++++ Ventas/Clientes.aspx | 224 ++++++++++++++++++++---------------- Ventas/Clientes.aspx.vb | 5 + 3 files changed, 152 insertions(+), 102 deletions(-) diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 7f2c2e6ca..3b0b13e38 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -949,6 +949,31 @@ Public Class ClsAcumuladores End Try + Return Retorno + End Function + + Public Function GetMovimientosDistribuidorResumen(CveCliente As Integer, CveEmpresa As Integer, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha) As Boolean + Dim Retorno As Boolean = False + 'Data = New DataTable + + SqlDataAdapter("PA_Acum_DistribuidorMovtosResumenGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + + OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + End Try + Return Retorno End Function diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 98bb2104e..62d141b39 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -858,8 +858,8 @@ - - + + @@ -1956,63 +1956,63 @@
- + CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-height="300" GridLines="None" DataKeyNames="CveVenta"> + - - - - - - + + + + + + - - - - - - - -   + + + + + + + +   - - - - -   + + + + +   - - - - -   + + + + +   - - - - - - - - - - - - - - - - <%----%> - - - - - - - - + + + + + + + + + + + + + + + + <%----%> + + + + + + + +
-
+ @@ -2046,53 +2046,53 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - +

- - + + - - - - - - - - - - -   + + + + + + + + + + +   - - - - -   + + + + +   - - - - -   + + + + +   - - - - - - - - - - - - -
+ + + + + + + + + + + + +
@@ -4188,7 +4188,7 @@ - + @@ -4197,7 +4197,7 @@ - + @@ -4210,6 +4210,31 @@ +
+
+
+
+ + Saldo de Cliente +
+
+
+
+
+
+
+ + + + + + + +
+
+
@@ -4302,8 +4327,8 @@ --%> + - @@ -4577,14 +4602,9 @@

- - + + -
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index f6fcd022c..be55071aa 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -9161,6 +9161,11 @@ Partial Class Clientes End If + If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa, TxtFechaIUsados.Text.ToDate, TxtFechaFUsados.Text.ToDate) Then + GvUsadosResumen.DataSource = ObjAcum.DtResultados + End If + GvUsadosResumen.DataBind() + 'LnkFacturaUsadosCargos.Visible = If(ImporteCargo > 0, True, False) LnkFacturaUsadosBonificacion.Visible = If(ImporteBonificacion > 0, True, False)