--unificacion de reporte de cortes, aspx

This commit is contained in:
2024-05-31 19:35:24 -07:00
parent 6889c7c5ea
commit 884c798c8f

View File

@@ -181,39 +181,62 @@ Partial Class Bancos_RepCortes
CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero
Fecha = gvr.DataKey("FechaInicial").ToString Fecha = gvr.DataKey("FechaInicial").ToString
Nombre = gvr.DataKey("Nombre").ToString Nombre = gvr.DataKey("Nombre").ToString
Dim ObjPuntoVenta As New ClsPuntoVenta
Dim ObjVentas As New ClsVentas 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then ' GvD.DataSource = DtCortesVentas
GvP.DataSource = ObjVentas.DtResultados
DtCortesVentasResumen = ObjVentas.DtResultados ' divDetalle.Visible = True
End If 'End If
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then 'If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
DivIVA.Visible = True ' GvP.DataSource = ObjVentas.DtResultados
If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then ' DtCortesVentasResumen = ObjVentas.DtResultados
GvPorIVA.DataSource = 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
divDetalle.Visible = True
'RESUMEN
DtCortesVentasResumen = DsDatos.Tables(1)
GvP.DataSource = DtCortesVentasResumen
'RESUMEN - IVA
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
DivIVA.Visible = True
GvPorIVA.DataSource = DsDatos.Tables(2)
End If
End If 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 If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvDep.DataSource = ObjVentas.DtResultados GvDep.DataSource = ObjVentas.DtResultados
If ObjVentas.DtResultados.Rows.Count > 0 Then If ObjVentas.DtResultados.Rows.Count > 0 Then
DivDep.Visible = True DivDep.Visible = True
End If End If
End If
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
GvD.DataSource = DtCortesVentas
divDetalle.Visible = True
End If
If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy()
End If End If
ObjVentas.Dispose()
If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then
HplDownPDF.Visible = True HplDownPDF.Visible = True
@@ -223,22 +246,13 @@ Partial Class Bancos_RepCortes
Else Else
HplDownPDF.Visible = False HplDownPDF.Visible = False
HplDownEXCEL.Visible = False HplDownEXCEL.Visible = False
End If End If
ObjVentas.Dispose()
ObjPuntoVenta.Dispose()
GvD.DataBind()
GvP.DataBind()
GvDep.DataBind()
GvPorIVA.DataBind()
GvIngresosRetiros.DataBind()
GvD.DataBind() GvD.DataBind()
GvP.DataBind() GvP.DataBind()
GvDep.DataBind() GvDep.DataBind()
GvPorIVA.DataBind() GvPorIVA.DataBind()
GvIngresosRetiros.DataBind()
If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) Then If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) Then
DivAnexo.Visible = True DivAnexo.Visible = True