From 367a3a41259e1444e8f142a1fcbf452f96127a84 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 25 May 2022 12:43:37 -0700 Subject: [PATCH] E140. Importe inicial de caja en reporte de cortes --- Bancos/RepCortes.aspx | 13 +++++++++++-- Bancos/RepCortes.aspx.vb | 34 ++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 3ccba8aaf..16ad5bcc7 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -231,7 +231,7 @@ - + @@ -240,7 +240,16 @@ - + + + + + + + + + + diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index e47ba73e7..bf069b542 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -8,10 +8,17 @@ Imports System.Collections.Generic Partial Class Bancos_RepCortes Inherits ClsPaginas - Private Shared missing As Object = System.Reflection.Missing.Value - + Private Shared missing As Object = System.Reflection.Missing.Value + #Region "PROPIEDADES" - + Private Property DtCortes As DataTable + Get + Return CType(ViewState("DtCortes"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtCortes") = value + End Set + End Property Private Property DtCortesVentasResumen As DataTable Get Return CType(ViewState("DtCortesVentasResumen"), DataTable) @@ -67,16 +74,20 @@ Partial Class Bancos_RepCortes #Region " C A R G A - D A T O S " - Public Sub CargaDatos() - Dim ObjPuntoVenta As New ClsPuntoVenta + Public Sub CargaDatos() + Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha) - Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha) + Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha) + + Dim ObjPuntoVenta As New ClsPuntoVenta If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then - GvDatos.DataSource = ObjPuntoVenta.DtResultados - GvDatos.DataBind() - UPDatos.Update() + DtCortes = ObjPuntoVenta.DtResultados.Copy() End If - ObjPuntoVenta.Dispose() + ObjPuntoVenta.Dispose() + + GvDatos.DataSource = DtCortes + GvDatos.DataBind() + UPDatos.Update() End Sub #End Region @@ -85,6 +96,9 @@ Partial Class Bancos_RepCortes If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CveCorte").ToString = "" Then e.Row.CssClass = "SubTotales2" + If DtCortes IsNot Nothing Then + e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2) + End If End If End If End Sub