From b44ece9922c19f9b2f9b79af13200025678514f9 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 3 Jan 2025 08:33:05 -0700 Subject: [PATCH] =?UTF-8?q?--=20impresi=C3=B3n=20corte,=20con=20edo=20cta?= =?UTF-8?q?=20E=20189?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/PopUpVerFactura.aspx.vb | 43 ++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index ad5b9c958..dfba54f77 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -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