From b81600f0283236cf2a0d859654b768c840cf15e0 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:10:34 -0700 Subject: [PATCH 1/9] Nomina --- App_Code/ClsNominas.vb | 8 ++++++++ App_Code/ClsPaginas.vb | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index b4d3bd9eb..b510c1cf2 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -35,6 +35,10 @@ Public Class ClsNominas Public Property FolioSolicitud As Integer + Public Property SalarioDiario As Double + Public Property SDI As Double + Public Property SBC As Double + Public Property RegistroPatronal As String Public Property SerieFolio As String @@ -1102,6 +1106,10 @@ Public Class ClsNominas Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero Me.Usuario = Data.Rows(0)("Usuario").ToString Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero + Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDecimal() + Me.SDI = Data.Rows(0)("SDI").ToString.ToDecimal() + Me.SBC = Data.Rows(0)("SBC").ToString.ToDecimal() + End If Retorno = True Catch ex As Exception diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 072a970f2..bde7ef85f 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -8521,12 +8521,10 @@ Public Class ClsPaginas Departamento = drow("NomRDepartamento").ToString() Puesto = drow("NomRPuesto").ToString() End If - RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario)) - RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI)) - RptParametro.Add(New ReportParameter("Departamento", Departamento)) - RptParametro.Add(New ReportParameter("Puesto", Puesto)) 'DATOS NOMINA If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then + SalarioDiario = ObjNomina.SalarioDiario.ToString + SDI = ObjNomina.SDI.ToString RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString)) RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie)) RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString)) @@ -8544,6 +8542,10 @@ Public Class ClsPaginas Else TieneError = True End If + RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario)) + RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI)) + RptParametro.Add(New ReportParameter("Departamento", Departamento)) + RptParametro.Add(New ReportParameter("Puesto", Puesto)) Else TieneError = True End If From 10aae8be27cb09453e26bc20e3dc3e2d984bae17 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:28:58 -0700 Subject: [PATCH 2/9] reprotede nominas --- Nomina/ReportedeAcumulados.aspx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Nomina/ReportedeAcumulados.aspx b/Nomina/ReportedeAcumulados.aspx index f846f0ce2..c71418404 100644 --- a/Nomina/ReportedeAcumulados.aspx +++ b/Nomina/ReportedeAcumulados.aspx @@ -337,6 +337,13 @@ + + Días Pagados + + + + + Días IMSS From 091efee79264085c44d2c7630e7bf9d19092b9ac Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 07:31:33 -0700 Subject: [PATCH 3/9] acum --- Nomina/ReportedeAcumulados.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nomina/ReportedeAcumulados.aspx b/Nomina/ReportedeAcumulados.aspx index c71418404..f6af883fd 100644 --- a/Nomina/ReportedeAcumulados.aspx +++ b/Nomina/ReportedeAcumulados.aspx @@ -340,7 +340,7 @@ Días Pagados - + From 2b6d081b43c1d9cb47940e971f89f19280fa00f6 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Mon, 23 Jun 2025 21:41:33 -0700 Subject: [PATCH 4/9] cambios --- Nomina/ReportedeAcumulados.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nomina/ReportedeAcumulados.aspx.cs b/Nomina/ReportedeAcumulados.aspx.cs index 76d441dfe..cb9b30d12 100644 --- a/Nomina/ReportedeAcumulados.aspx.cs +++ b/Nomina/ReportedeAcumulados.aspx.cs @@ -197,7 +197,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas //string ctipo = "P"; - int CurrentColumn = 7; + int CurrentColumn = 8; BoundField bf; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows) { From 8b311a1a7980d9eacade3ce1549ccfcd865bfea4 Mon Sep 17 00:00:00 2001 From: JPerez Date: Tue, 24 Jun 2025 10:08:49 -0700 Subject: [PATCH 5/9] --Cambios Excel repIVA --- Contabilidad/RepIVA.aspx.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 2ddf94156..9125c4783 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -401,6 +401,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas { excelWorksheet.Columns[k + 1].Style.NumberFormat = "#,##0.00"; } + //FOLIOS + if (excelWorksheet.Columns[k + 1].Name.Contiene("C", "M")) + { + excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; + } break; case "IVA Acreditable": //FECHAS,FOLIOS, NUM CUENTA @@ -414,6 +419,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas excelWorksheet.Columns[k + 1].Style.NumberFormat = "0"; excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; } + //FOLIOS + if (excelWorksheet.Columns[k + 1].Name.Contiene("E", "Z")) + { + excelWorksheet.Columns[k + 1].Style.HorizontalAlignment = HorizontalAlignmentStyle.Left; + } break; default: break; From 3c2b07622f8a06b145cad649e8deb3a1a530143f Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Tue, 24 Jun 2025 12:05:50 -0700 Subject: [PATCH 6/9] ajustes CSS --- General/Dashboard.aspx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/General/Dashboard.aspx b/General/Dashboard.aspx index 9a655c1f0..3db415956 100644 --- a/General/Dashboard.aspx +++ b/General/Dashboard.aspx @@ -428,6 +428,15 @@ overflow: auto; } */ + .thcenternowrap th{ + text-align:center; + white-space:nowrap + } + .thcenternowrap th div{ + display:inline-block !important; + text-align:center; + white-space:nowrap + } @@ -492,7 +501,7 @@
Date: Tue, 24 Jun 2025 14:28:11 -0700 Subject: [PATCH 7/9] [Fix(Chechadores)] se reparo un error ejecucion al entrar al catalogo con cero items en el grid --- RH/CatChecadores.aspx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RH/CatChecadores.aspx.cs b/RH/CatChecadores.aspx.cs index 7e3ca781d..cb3c9138b 100644 --- a/RH/CatChecadores.aspx.cs +++ b/RH/CatChecadores.aspx.cs @@ -42,7 +42,10 @@ public partial class RH_CatChecadores : ClsPaginas ObjRH.Dispose(); GvDatos.DataBind(); - GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text; + if(GvDatos.HeaderRow != null && GvDatos.HeaderRow.Cells.Count > 0) + { + GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text; + } } private void CargaSubProyectos() From 99274e5346d07b1dde6b1673ed2169c6d783be2f Mon Sep 17 00:00:00 2001 From: Luis Carlos Quijada Date: Tue, 24 Jun 2025 16:37:00 -0600 Subject: [PATCH 8/9] Cambios ProductosServicios --- App_Code/ClsProductosServicios.vb | 11 ++++++++--- Ventas/ProductosServicios.aspx | 11 +++++++++++ Ventas/ProductosServicios.aspx.vb | 10 +++++++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 86c935ff1..2ce03c048 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -34,6 +34,7 @@ Public Class ClsProductosServicios Public Property NumeroParte As String Public Property CodigoBarras As String Public Property PS As String + Public Property PSExtranjero As String Public Property Precio As Double Public Property PrecioMinimo As Double Public Property Oferta As Double @@ -203,7 +204,7 @@ Public Class ClsProductosServicios End Sub #End Region Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional NumeroParte As String = "-1", - Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, + Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional PSExtranjero As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1, Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -216,6 +217,7 @@ Public Class ClsProductosServicios .Add("@NumeroParte", SqlDbType.VarChar).Value = NumeroParte .Add("@CodigoBarras", SqlDbType.VarChar).Value = CodigoBarras .Add("@PS", SqlDbType.VarChar).Value = PS + .Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@EsPaquete", SqlDbType.SmallInt).Value = EsPaquete .Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta @@ -245,6 +247,7 @@ Public Class ClsProductosServicios Me.NumeroParte = Data.Rows(0)("NumeroParte").ToString Me.CodigoBarras = Data.Rows(0)("CodigoBarras").ToString Me.PS = Data.Rows(0)("PS").ToString + Me.PSExtranjero = Data.Rows(0)("PSExtranjero").ToString Precio = Data.Rows(0)("Precio").ToString.ToDouble PrecioMinimo = Data.Rows(0)("PrecioMinimo").ToString.ToDouble Oferta = Data.Rows(0)("Oferta").ToString.ToDouble @@ -402,7 +405,7 @@ Public Class ClsProductosServicios Return Retorno End Function Public Function AddPS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, Optional PSExtranjero As String = "-1", Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, @@ -438,6 +441,7 @@ Public Class ClsProductosServicios .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@EsPaquete", SqlDbType.Bit).Value = EsPaquete + .Add("@PSExtranjero", SqlDbType.VarChar).Value = If(PSExtranjero.Length > 845, PSExtranjero.Substring(0, 845), PSExtranjero) .Add("@CveMetodoInventario", SqlDbType.Int).Value = CveMetodoInventario .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS @@ -687,7 +691,7 @@ Public Class ClsProductosServicios End Function Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional PSExtranjero As String = "-1", Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, @@ -734,6 +738,7 @@ Public Class ClsProductosServicios .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero 'Nuevo R: 26/09/2017' .Add("@Inventariable", SqlDbType.Bit).Value = Inventariable diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index f9011af81..a5ad37be6 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -285,6 +285,17 @@
+ +
+
+
+ + + +
+
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index f46fe49a4..d57e9aae0 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -983,6 +983,7 @@ Partial Class ProductosyServicios TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString TxtPS.Text = ObjProductosServicios.PS + TxtPSExtranjero.Text = ObjProductosServicios.PSExtranjero TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma TxtPrecioMinimo.Text = ObjProductosServicios.PrecioMinimo.ToString("F4") @@ -1577,10 +1578,12 @@ Partial Class ProductosyServicios End If If CvePS = -1 Then Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "") If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, + ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, @@ -1650,11 +1653,12 @@ Partial Class ProductosyServicios 'End If Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") + Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "") If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper - + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True, - ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, + ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, From f2d73b7eeac10f1f39425c48011df69b17ccb17e Mon Sep 17 00:00:00 2001 From: JPerez Date: Tue, 24 Jun 2025 18:45:27 -0700 Subject: [PATCH 9/9] --FIX filtrar porcentaje de IVA al aplicar ant --- Ventas/PVCobranza.aspx.vb | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index 5d6a9c720..67455a4b5 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -1358,7 +1358,6 @@ Partial Class Ventas_PVCobranza RemisionesLista.Add(VentaRemision.CveVenta) Dim DtRemisionesPS As New DataTable() - Dim DtPagosFacturaGlobal As New DataTable() If ObjClientes.GetVentasRemisionesTotales(VentaRemision.CveCliente, VentaRemision.CveVenta.ToString(), 1, UsuarioActual.CveEmpresa) Then DtRemisionesPS = ObjClientes.DtResultados.Copy() @@ -1399,6 +1398,21 @@ Partial Class Ventas_PVCobranza If GvRow.DataKey("Tipo").Contiene("NC", "IxC", "Ant") AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex) IsNot Nothing AndAlso GvRow.FCCheckBox("Chk" & GvRow.RowIndex).Checked Then Dim CveFormaPagoAnt = GvRow.DataKey("CveFormaPago").ToEntero() + + If GvRow.DataKey("Tipo").Contiene("Ant") Then + 'SI NO ES AMORTIZACION DE ANTICIPO + If Not CveFormaPagoAnt = 21 Then + CveFormaPagoAnt = 21 + End If + End If + + 'If GvRow.DataKey("Tipo").Contiene("NC") Then + ' 'SI NO ES AMORTIZACION DE ANTICIPO o DEVOLUCION + ' If Not CveFormaPagoAnt.Contiene(21, 11) Then + ' CveFormaPagoAnt = 21 + ' End If + 'End If + Dim Importe = GvRow.FCTextBox(String.Format("TxtAnticipo{0}", GvRow.RowIndex)).Text.ToDecimal() DtPagos.Rows.Add({CveFormaPagoAnt, Importe}) @@ -1423,17 +1437,22 @@ Partial Class Ventas_PVCobranza If TxtImporteEfectivo.Text.ToDecimal > 0 Then Dim tpag As Decimal = LtlSaldo.Text.ToDecimal - PagadoSinEfectivo If TxtImporteEfectivo.Text.ToDecimal < tpag Then tpag = TxtImporteEfectivo.Text.ToDecimal - DtPagos.Rows.Add({1, tpag}) + + If tpag > 0 Then + DtPagos.Rows.Add({1, tpag}) + End If End If Dim PagoMaximo = DtPagos.MAX("Importe") Dim CveFormaPago As Integer = DtPagos.FiltroPrimeroValor("CveFormaPago", $"Importe = {PagoMaximo}").ToEntero() + If CveFormaPago > 0 Then ObjFactura.CveFormaPago = CveFormaPago ObjFactura.CveMetodoPago = 1 ObjFactura.ClaveMetodoPagoSAT = "PUE" ObjFactura.ClaveFormaPagoSAT = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjFactura.CveFormaPago}") End If + ObjFactura.FechaPago = Now 'venta de cantado el mismo dia Else 'venta a crédito @@ -2331,19 +2350,23 @@ Partial Class Ventas_PVCobranza DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("") End If ObjVentas.Dispose() - Dim tTipoDocto As String + + Dim tTipoDocto As String = "" + Dim PorcentajeIVA As Decimal = -1 + If DbRowVenta IsNot Nothing Then CveCliente = DbRowVenta("CveCliente").ToString().ToEntero() CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero() tTipoDocto = DbRowVenta("TipoDocto").ToString() + PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString().ToDecimal() End If If CveCliente > 0 Then - CargaAnticipos(CveCliente, tTipoDocto) + CargaAnticipos(CveCliente, tTipoDocto, PorcentajeIVA) End If End Sub - Private Sub CargaAnticipos(CveCliente As Integer, TipoDocto As String) + Private Sub CargaAnticipos(CveCliente As Integer, TipoDocto As String, PorcentajeIVA As Decimal) If CveCliente > 0 Then Dim ObjMovtos As New ClsMovimientos() If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then @@ -2355,7 +2378,8 @@ Partial Class Ventas_PVCobranza If TipoDocto = "Ant" Then TipoAnticipo = " 'IxC' " If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then - GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo}) ") + GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo}) AND (PorcentajeIVA = {PorcentajeIVA} OR Tipo = 'IxC')") + 'GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo})") Else GVAnticipos.DataSource = Nothing End If