--FIX Impresion cortes
This commit is contained in:
@@ -1736,20 +1736,13 @@ Partial Class PopUpVerFactura
|
|||||||
Dim OpcionDetallado As Integer = 1
|
Dim OpcionDetallado As Integer = 1
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(197, 189) Then OpcionDetallado = 2
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(197, 189) Then OpcionDetallado = 2
|
||||||
|
|
||||||
Dim ConsultaPorSucursal As Boolean = UsuarioActual.Empresa.Funcionalidad(382) = "1"
|
If CveCorte > 0 AndAlso (FechaConsulta = ModExtensiones.MaxFecha OrElse CveSubProyecto <= 0) Then
|
||||||
|
Using ObjVta As New ClsPuntoVenta
|
||||||
If ConsultaPorSucursal Then
|
If ObjVta.GetVta_Cortes("-1", "-1", -1, CveCorte, UsuarioActual.CveEmpresa, -1) AndAlso ObjVta.DtResultados.Rows.Count > 0 Then
|
||||||
'SI NO TIENE ESTOS VALORES, SARCALOS DEL CORTE
|
FechaConsulta = ObjVta.DtResultados.FiltroPrimeroValor("FechaInicial").ToString().ToDate().Date
|
||||||
If CveCorte > 0 AndAlso (FechaConsulta = ModExtensiones.MaxFecha OrElse CveSubProyecto <= 0) Then
|
CveSubProyecto = ObjVta.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||||
Using ObjVta As New ClsPuntoVenta
|
End If
|
||||||
If ObjVta.GetVta_Cortes("-1", "-1", -1, CveCorte, UsuarioActual.CveEmpresa, -1) AndAlso ObjVta.DtResultados.Rows.Count > 0 Then
|
End Using
|
||||||
FechaConsulta = ObjVta.DtResultados.FiltroPrimeroValor("FechaInicial").ToString().ToDate().Date
|
|
||||||
CveSubProyecto = ObjVta.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CveCorte = -1
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjVenta As New ClsVentas
|
Dim ObjVenta As New ClsVentas
|
||||||
@@ -1774,16 +1767,9 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(189, 197) Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(189, 197) Then
|
||||||
If ConsultaPorSucursal Then
|
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaConsulta, FechaConsulta, CveSubProyecto) Then
|
||||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaConsulta, FechaConsulta, CveSubProyecto) Then
|
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("FechaInicial IS NOT NULL")
|
||||||
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("FechaInicial IS NOT NULL")
|
Fecha = FechaConsulta.ToString("dd/MM/yyyy")
|
||||||
Fecha = FechaConsulta.ToString("dd/MM/yyyy")
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then
|
|
||||||
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0")
|
|
||||||
Fecha = DtReporteCorte.FiltroPrimeroValor("FechaInicial", "")
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1, CveSubProyecto:=CveSubProyecto, FechaConsulta:=FechaConsulta) Then
|
If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1, CveSubProyecto:=CveSubProyecto, FechaConsulta:=FechaConsulta) Then
|
||||||
@@ -1799,7 +1785,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
Dim FechaCorte As String = $" <b>Fecha fin</b> {Fecha}"
|
Dim FechaCorte As String = $" <b>Fecha fin</b> {Fecha}"
|
||||||
If ConsultaPorSucursal Then
|
If OpcionDetallado = 2 Then
|
||||||
FechaCorte = $" <b>Fecha: </b> {Fecha}"
|
FechaCorte = $" <b>Fecha: </b> {Fecha}"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user