--unificacion de reporte de cortes, aspx
This commit is contained in:
@@ -181,39 +181,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
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
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
|
||||
Nombre = gvr.DataKey("Nombre").ToString
|
||||
|
||||
'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
|
||||
|
||||
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
|
||||
|
||||
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 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
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then
|
||||
HplDownPDF.Visible = True
|
||||
@@ -223,22 +246,13 @@ Partial Class Bancos_RepCortes
|
||||
Else
|
||||
HplDownPDF.Visible = False
|
||||
HplDownEXCEL.Visible = False
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
ObjPuntoVenta.Dispose()
|
||||
|
||||
|
||||
GvD.DataBind()
|
||||
GvP.DataBind()
|
||||
GvDep.DataBind()
|
||||
GvPorIVA.DataBind()
|
||||
GvIngresosRetiros.DataBind()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
GvD.DataBind()
|
||||
GvP.DataBind()
|
||||
GvDep.DataBind()
|
||||
GvPorIVA.DataBind()
|
||||
GvIngresosRetiros.DataBind()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) Then
|
||||
DivAnexo.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user