diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx
index 730699f32..b68299bfd 100644
--- a/Ventas/PVCobranza.aspx
+++ b/Ventas/PVCobranza.aspx
@@ -1349,9 +1349,10 @@
-
+ DataKeyNames="CveCuenta">
@@ -1362,8 +1363,8 @@
@@ -1417,7 +1418,7 @@
-
diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb
index 319ce9a5e..9f9cff59e 100644
--- a/Ventas/PVCobranza.aspx.vb
+++ b/Ventas/PVCobranza.aspx.vb
@@ -167,6 +167,10 @@ Partial Class Ventas_PVCobranza
DivNoTimbradas.Visible = True
End If
+ If UsuarioActual.TienePermisoProceso(407) Then
+ LnkEstadosCaja.Visible = True
+ End If
+
End If
End Sub
@@ -3015,8 +3019,83 @@ Partial Class Ventas_PVCobranza
TxtImporteContado.Text = (LtlSaldo.Text.ToDecimal + SaldoCxC).FormatoNumero
RegistraScript("$('#divCxC').hide();", "AE21")
UPPCobranza.Update()
- UPPTotalesContado.update
+ UPPTotalesContado.Update()
+
End Sub
+
+
+ Private Property DTEstadosCaja As DataTable
+ Get
+ If ViewState("DTEstadosCaja") Is Nothing Then
+ ViewState("DTEstadosCaja") = New DataTable
+ End If
+ Return DirectCast(ViewState("DTEstadosCaja"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DTEstadosCaja") = value
+ End Set
+ End Property
+
+ Protected Sub LnkEstadosCaja_Click(sender As Object, e As EventArgs)
+ GvEstadoCajas.DataSource = Nothing
+ DTEstadosCaja = New DataTable
+ Dim objPuntoVenta As New ClsPuntoVenta
+ Dim FechaInicio As Date = New Date(txtFechaI.Text.ToDate.Year, 1, 1)
+ Dim FechaFin As Date = New Date(FechaInicio.Year, 12, 31)
+ Dim CveCuenta As Integer = 197107
+
+ If objPuntoVenta.GetVta_EstadoCajas(CveCuenta, UsuarioActual.CveEmpresa, FechaInicio, FechaFin) Then
+ GvEstadoCajas.DataSource = objPuntoVenta.DtResultados
+ DTEstadosCaja = objPuntoVenta.DtResultados
+ End If
+
+ objPuntoVenta.Dispose()
+
+ GvEstadoCajas.DataBind()
+
+
+
+ UpDVEstadoCaja.Update()
+ RegistraScript("$('#DVEstadoCaja').modal()")
+
+ End Sub
+
+
+ Protected Sub GvEstadoCajas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
+
+ If DTEstadosCaja.Rows.Count > 0 Then
+
+ If e.Row.RowType = DataControlRowType.Header Then
+ e.Row.Cells(0).Visible = False
+ e.Row.Cells(1).Width = 300
+ End If
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ e.Row.Cells(0).Visible = False
+ e.Row.Cells(1).Width = 300
+ e.Row.Cells(1).Attributes.Add("style", "white-space: nowrap;")
+ Dim IndexRow As Integer = e.Row.RowIndex
+ Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero
+
+ For x = 2 To DTEstadosCaja.Columns.Count - 1
+
+ Dim Fecha As Date = DTEstadosCaja.Columns(x).ColumnName.ToString.ToDate
+ Dim Liga As String = $"../Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx?CveCuenta={CveCuenta}&FI={Fecha.ToString("dd/MM/yyyy")}&FF={Fecha.ToString("dd/MM/yyyy")}&CveProyecto=-1&CveSubProyecto=-1&TP=1"
+ Dim Importe As Decimal = DTEstadosCaja.Rows(IndexRow)(x).ToString.ToDecimal
+
+ If Importe <> 0 Then
+ e.Row.Cells(x).Text = $"{Importe.ToString("###,###,###.00")}"
+ Else
+ e.Row.Cells(x).Text = ""
+ End If
+
+ Next
+
+ End If
+ End If
+
+ End Sub
+
End Class
Public Class MRespuestaSAT