diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index ebeb39d24..76933f943 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -1566,29 +1566,36 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then OpcionDetallado = 2
Dim ObjVenta As New ClsVentas
- Dim ObjPuntoVenta As New ClsPuntoVenta
- If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
- DtCortesVentasResumen = ObjVenta.DtResultados.Copy()
- End If
+ If ObjVenta.GetVta_ReporteCortesDetalle(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, 2) Then
+ Dim DsDatos = ObjVenta.DataSetResultados.Copy()
+ If DsDatos IsNot Nothing Then
+ DtCortesVentas = DsDatos.Tables(0)
- If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then
- DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
- If DtCortesVentas.Rows.Count > 0 Then
- Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
-
- Fecha = RowInfo("FechaInicial").ToString
- Nombre = RowInfo("Nombre").ToString
+ DtCortesVentasResumen = DsDatos.Tables(1)
End If
End If
+ ' If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
+ ' DtCortesVentasResumen = ObjVenta.DtResultados.Copy()
+ 'End If
+
+ 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa, OpcionDetallado) Then
+ ' DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
+ ' If DtCortesVentas.Rows.Count > 0 Then
+ ' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
+
+ ' Fecha = RowInfo("FechaInicial").ToString
+ ' Nombre = RowInfo("Nombre").ToString
+ ' End If
+ 'End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then
- If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then
- DtReporteCorte = ObjPuntoVenta.DtResultados.FiltraParametros("CveCorte > 0")
+ If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then
+ DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0")
End If
- If ObjPuntoVenta.GetVta_MovimientosCajas(CveCorte, -1) Then
- DtIngresosRetiros = ObjPuntoVenta.DtResultados.Copy()
+ If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1) Then
+ DtIngresosRetiros = ObjVenta.DtResultados.Copy()
End If
If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVenta.GetCortesDetalleDepositosCaja(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
@@ -1597,7 +1604,7 @@ Partial Class PopUpVerFactura
End If
ObjVenta.Dispose()
- ObjPuntoVenta.Dispose()
+
Dim FechaCorte As String = $" Fecha fin {Fecha}"
Dim Usuario As String = $" Usuario {Nombre}"