-- impresión corte, con edo cta E 189

This commit is contained in:
2025-01-03 08:33:05 -07:00
parent 15a7001e19
commit b44ece9922

View File

@@ -1599,7 +1599,7 @@ Partial Class PopUpVerFactura
Dim Fecha As String = "", Nombre As String = ""
Dim OpcionDetallado As Integer = 1
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 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"
@@ -1628,7 +1628,6 @@ Partial Class PopUpVerFactura
End If
End If
If DtCortesVentas.Rows.Count > 0 Then
Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
@@ -1639,7 +1638,7 @@ Partial Class PopUpVerFactura
End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 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
DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("FechaInicial IS NOT NULL")
@@ -1693,7 +1692,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}"))
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(189, 197) Then
If DtReporteCorte IsNot Nothing Then
Dim dtDatos = DtReporteCorte.Clone()
dtDatos.ImportRow(DtReporteCorte.Rows(0))
@@ -1839,21 +1838,29 @@ Partial Class PopUpVerFactura
lrds.Add(rds5)
If UsuarioActual.CveEmpresa.Contiene(197, 193) Then
If UsuarioActual.CveEmpresa.Contiene(197, 193, 189) Then
Dim CveCuenta As Integer = -1
If UsuarioActual.CveEmpresa = 193 Then
CveCuenta = 186367
Else
CveCuenta = 0
If CveSubProyecto = 12756 Then 'nav
CveCuenta = 188796
End If
If CveSubProyecto = 12755 Then 'hillo
CveCuenta = 188795
End If
'obtener relación contable
Dim objC As New ClsContabilidad
If objC.GetCuentasAsignaciones(UsuarioActual.CveEmpresa, 30) Then
'obtengo la cvecuentabancaria
Dim tCveBancoCuenta As Integer = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa, Estatus:=-1, CveTipoCuenta:=1).FiltroPrimeroValor("CveCuenta", $"CveSubProyecto = {CveSubProyecto}").ToEntero
CveCuenta = objC.DtResultados.FiltroPrimeroValor("CveCuenta", $"CveBancoCuenta = {tCveBancoCuenta}").ToEntero
End If
objC.Dispose()
'If UsuarioActual.CveEmpresa = 193 Then
' CveCuenta = 186367
'Else
' CveCuenta = 0
' If CveSubProyecto = 12756 Then 'nav
' CveCuenta = 188796
' End If
' If CveSubProyecto = 12755 Then 'hillo
' CveCuenta = 188795
' End If
'End If
If CveCuenta >= 0 Then
Using ObjConta As New ClsContabilidad
@@ -1868,7 +1875,6 @@ Partial Class PopUpVerFactura
Dim rdsDepositos As New ReportDataSource With {.Name = "DsDepositos", .Value = DtDepositos}
lrds.Add(rdsDepositos)
End If
End If
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
@@ -1885,7 +1891,6 @@ Partial Class PopUpVerFactura
Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = DtCortesVentas}
lrds.Add(rds2)
ImprimirPDF(DirFormato, lrds, params, "ReporteCortes", Formato)
End If