From dc0cda7142c9f3468ba9cf57e0f669d314df37cb Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 20 Jun 2024 16:50:54 -0700 Subject: [PATCH] Correciones Solicitudes SAT --- App_Code/ClsCompras.vb | 2 +- App_Code/ClsMovimientos.vb | 7 +- Compras/Compras.aspx.vb | 4 +- Contabilidad/RepIVA.aspx.cs | 5 +- Contratos/RepPresupuestos.aspx.vb | 9 +- .../Grales/Formatos/RepPresupuestoAnual.rdlc | 2124 +++++++++-------- General/SaldosMenores.aspx | 58 +- General/SaldosMenores.aspx.vb | 191 +- OC/OC.aspx.vb | 10 +- SAT/SolicitudesIngresoSat.aspx.cs | 13 +- SAT/SolicitudesNominaSat.aspx | 2 +- SAT/SolicitudesNominaSat.aspx.cs | 152 +- 12 files changed, 1464 insertions(+), 1113 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 10be3c7d4..a2491dbad 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -574,7 +574,7 @@ Public Class ClsCompras DataAdapter("PA_Comp_CompraDetalleRemove") - + SqlAdapter.SelectCommand.CommandTimeout = 0 With SqlAdapter.SelectCommand.Parameters .Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle End With diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index dced0eeca..a7bd91c78 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -117,7 +117,9 @@ Public Class ClsMovimientos #Region "CxC" - Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean + Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", + Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha, Optional Opcion As Integer = 1, Optional SaldoMayorA As Decimal = -999999999999, + Optional SaldoMenorA As Decimal = 999999999999) As Boolean Dim Retorno As Boolean = False FechaCorte = IIf(FechaCorte = Nothing, ClsPaginas.NowADS().AddYears(1), FechaCorte).ToString.ToDate @@ -135,6 +137,9 @@ Public Class ClsMovimientos .Add("@FechaCorte", SqlDbType.Date).Value = FechaCorte .Add("@FechaVencimientoI", SqlDbType.Date).Value = FechaVencimientoI .Add("@FechaVencimientoF", SqlDbType.Date).Value = FechaVencimientoF + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@SaldoMayorA", SqlDbType.Money).Value = SaldoMayorA + .Add("@SaldoMenorA", SqlDbType.Money).Value = SaldoMenorA End With Try diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 81cb8ee6f..d945f314e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1948,7 +1948,7 @@ Partial Class Compras_Compras For Each concepto As XmlNode In nodeconceptos ' Obtener la descripción del concepto Dim descripcion As String = ValorXML(concepto, "Descripcion") - Dim importeValue As Decimal = Decimal.Parse(ValorXML(concepto, "Importe")) + Dim importeValue As Decimal = Decimal.Parse(ValorXML(concepto, "Importe")).RoundSQL(2) ' Seleccionar el nodo de Impuestos dentro de Concepto, si existe Dim impuestosNode As XmlNode = concepto.SelectSingleNode("cfdi:Impuestos", namespaces) @@ -1958,7 +1958,7 @@ Partial Class Compras_Compras Dim retenciones As XmlNodeList = impuestosNode.SelectNodes("cfdi:Retenciones/cfdi:Retencion", namespaces) For Each retencion As XmlNode In retenciones ' Obtener los valores de los atributos Base e Importe - Dim baseValue As Decimal = Decimal.Parse(ValorXML(retencion, "Base")) + Dim baseValue As Decimal = Decimal.Parse(ValorXML(retencion, "Base")).RoundSQL(2) Dim impuesto As String = ValorXML(retencion, "Impuesto") If impuesto = "001" Then diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 7281c9988..ace02b2f8 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -260,8 +260,9 @@ public partial class Contabilidad_RepIVA : ClsPaginas ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Ruta, Dt, para, DtIEPSA, DtIVAA, "RepIEPSPorcentaje.rpt", "RepIVAPorcentaje.rpt", "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); - - + //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); + + } Ruta.GuardaLogAD(); //ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion); diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index 32dd3467a..7995872cd 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -605,9 +605,14 @@ Partial Class Contratos_RepPresupuestos params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) params.Add(New ReportParameter("PorEjercer", LtlPorEjercer.Text.FormatoNumero())) - - params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + + + params.Add(New ReportParameter("PresupuestoRestrictivo", UsuarioActual.Empresa.Funcionalidad(532))) + + ImprimirPDF("Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc", DtPresupuestos, params, "Reporte de Presupuestos Anual", Formato) + Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc index 83cd50208..446a7587f 100644 --- a/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc +++ b/Empresas/Grales/Formatos/RepPresupuestoAnual.rdlc @@ -1,1061 +1,5 @@  - - - - - true - true - - - - - =Parameters!PorEjercer.Value - - - - - - - - - - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - true - true - - - - - Descripcion - - - - - - - Textbox28 - - - - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 3.13228cm - - - 3.06185cm - - - 1.55043cm - - - 3.45602cm - - - 1.46938cm - - - - - 0.6cm - - - - - true - true - - - - - =iif(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value) - - - - - - - Huerta - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =iif(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value) - - - - - - - Motivo - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =iif(CDec(Fields!EjercidoPorcentaje.Value)=0,"-",Fields!EjercidoPorcentaje.Value) - - - - - - - TicketBascula - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =iif(CDec(Fields!PorEjercer.Value)=0,"-",Fields!PorEjercer.Value) - - - - - - - Peso - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =iif(CDec(Fields!PorEjercerPorcentaje.Value)=0,"-",Fields!PorEjercerPorcentaje.Value) - - - - - - - PesoMerma - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.6cm - - - true - true - - - - - Importe - - - - - - - Textbox40 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Importe - - - - - - - Textbox42 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - % - - - - - - - Textbox44 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Importe - - - - - - - Textbox47 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - % - - - - - - - Textbox4 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 7.14207cm - - - true - true - - - - - =Fields!Agrupador.Value - - - - - - - FolioOC - - - =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - DataSet1 - 3.39562cm - 0.17167cm - 1.2cm - 19.81203cm - 1 - - - - - - true - true - - - - - =Parameters!Ejercido.Value - - - - - - - - - - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Autorizado.Value - - - - - - - - - - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - Textbox1 - 0.34368cm - 0.06614cm - 0.58236cm - 19.58715cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 1.9343in - - - - - - - Textbox1 - 2.43857cm - 0.6cm - 14.68354cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE PRESUPUESTO ANUAL - - - - - - - - - - - - - - - - Textbox2 - 0.63528cm - 2.40329cm - 0.52945cm - 14.68354cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 2 - - - - - - - - - - - 1.08126cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.40041cm - 16.97887cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + true + true + + + + + Descripcion + + + + + + + Textbox28 + + + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 3.13228cm + + + 3.06185cm + + + 1.55043cm + + + 3.45602cm + + + 1.46938cm + + + + + 0.6cm + + + + + true + true + + + + + =iif(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value) + + + + + + + Huerta + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + = IIF( Parameters!PresupuestoRestrictivo.Value = "2", IIF(CDec(Fields!Autorizado.Value)=0,"-",Fields!Autorizado.Value),IIF(CDec(Fields!Ejercido.Value)=0,"-",Fields!Ejercido.Value)) + + + + + + + Motivo + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =iif(CDec(Fields!EjercidoPorcentaje.Value)=0,"-",Fields!EjercidoPorcentaje.Value) + + + + + + + TicketBascula + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =iif(CDec(Fields!PorEjercer.Value)=0,"-",Fields!PorEjercer.Value) + + + + + + + Peso + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =iif(CDec(Fields!PorEjercerPorcentaje.Value)=0,"-",Fields!PorEjercerPorcentaje.Value) + + + + + + + PesoMerma + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.6cm + + + true + true + + + + + Importe + + + + + + + Textbox40 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + Importe + + + + + + + Textbox42 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + % + + + + + + + Textbox44 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + Importe + + + + + + + Textbox47 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + % + + + + + + + Textbox4 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 7.14207cm + + + true + true + + + + + =Fields!Agrupador.Value + + + + + + + FolioOC + + + =IIf(Fields!Tipo.Value = 0, "#67809F",IIf(Fields!Tipo.Value = 1,"LightSteelBlue","Transparent")) + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + DataSet1 + 3.39562cm + 0.17167cm + 1.2cm + 19.81203cm + 1 + + + + + + true + true + + + + + =Parameters!Ejercido.Value + + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Autorizado.Value + + + + + + + + + + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox1 + 0.34368cm + 0.06614cm + 0.58236cm + 19.58715cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 1.9343in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE PRESUPUESTO ANUAL + + + + + + + + + + + + + + + + Textbox2 + 0.63528cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.08126cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm +