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