This commit is contained in:
2024-05-31 20:06:26 -07:00
10 changed files with 243 additions and 116 deletions

View File

@@ -110,7 +110,7 @@ Partial Class Bancos_RepCortes
e.Row.CssClass = "SubTotales2"
If DtCortes IsNot Nothing Then
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
End If
End If
Else
If UsuarioActual.CveRol = 1 Then
If e.Row.DBCampo("VentasCorte").ToDecimal.RoundSQL <> e.Row.DBCampo("VentaTotalIngreso").ToDecimal + e.Row.DBCampo("VentaTotalRemision").ToDecimal.RoundSQL Then
@@ -192,39 +192,62 @@ Partial Class Bancos_RepCortes
CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero
Fecha = gvr.DataKey("FechaInicial").ToString
Nombre = gvr.DataKey("Nombre").ToString
Nombre = gvr.DataKey("Nombre").ToString
Dim ObjVentas As New ClsVentas
'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
' GvD.DataSource = DtCortesVentas
' divDetalle.Visible = True
'End If
'If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
' GvP.DataSource = ObjVentas.DtResultados
' DtCortesVentasResumen = ObjVentas.DtResultados
'End If
'If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
' DivIVA.Visible = True
' If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
' GvPorIVA.DataSource = ObjVentas.DtResultados
' End If
'End If
Dim ObjPuntoVenta As New ClsPuntoVenta
If ObjPuntoVenta.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
Dim DsDatos = ObjPuntoVenta.DataSetResultados.Copy()
If DsDatos IsNot Nothing Then
'DESGLOSE
DtCortesVentas = DsDatos.Tables(0)
GvD.DataSource = DtCortesVentas
If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvP.DataSource = ObjVentas.DtResultados
DtCortesVentasResumen = ObjVentas.DtResultados
End If
divDetalle.Visible = True
'RESUMEN
DtCortesVentasResumen = DsDatos.Tables(1)
GvP.DataSource = DtCortesVentasResumen
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
DivIVA.Visible = True
If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvPorIVA.DataSource = ObjVentas.DtResultados
'RESUMEN - IVA
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
DivIVA.Visible = True
GvPorIVA.DataSource = DsDatos.Tables(2)
End If
End If
End If
If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy()
End If
ObjPuntoVenta.Dispose()
Dim ObjVentas As New ClsVentas
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDep.DataSource = ObjVentas.DtResultados
If ObjVentas.DtResultados.Rows.Count > 0 Then
DivDep.Visible = True
End If
End If
If ObjVentas.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
DtCortesVentas = ObjVentas.DtResultados.Copy()
GvD.DataSource = DtCortesVentas
divDetalle.Visible = True
End If
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then
HplDownPDF.Visible = True
@@ -235,22 +258,13 @@ Partial Class Bancos_RepCortes
HplDownPDF.Visible = False
HplDownEXCEL.Visible = False
End If
ObjVentas.Dispose()
GvD.DataBind()
GvP.DataBind()
GvDep.DataBind()
GvPorIVA.DataBind()
GvIngresosRetiros.DataBind()
GvD.DataBind()
GvP.DataBind()
GvDep.DataBind()
GvPorIVA.DataBind()
If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) Then
DivAnexo.Visible = True
Dim CveCuenta As Integer = 0