-- Porcentaje de IVA Fijo, para cuando viene de cotizaciones

This commit is contained in:
2024-12-19 13:31:39 -07:00
parent ab86c6a663
commit da9eb167cd

View File

@@ -20332,7 +20332,7 @@ Partial Class Ventas
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0,
Optional Costo As Decimal = 0) As Boolean
Optional Costo As Decimal = 0, Optional PorcentajeIVAFijo As Decimal = -1) As Boolean
Dim Retorno As Boolean = False
Try
@@ -20456,7 +20456,11 @@ Partial Class Ventas
End If
If DrPS("IVA").ToString().Contiene("-1", "") Then
Row("PorcentajeIVA") = PorcentajeIVA
If PorcentajeIVAFijo > 0 Then
Row("PorcentajeIVA") = PorcentajeIVAFijo 'si mandan el dato quiere decir que está fijo!
Else
Row("PorcentajeIVA") = PorcentajeIVA
End If
Else
Row("PorcentajeIVA") = DrPS("IVA")
End If
@@ -33391,7 +33395,8 @@ Partial Class Ventas
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True,
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal)
Next
'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
@@ -35270,7 +35275,7 @@ Partial Class Ventas
PorcentajeIVA = Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2).ToDecimal
For Each Row As DataRow In TmpDT.Rows
If PorcentajeIVA > 0 Then
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row("CvePS").ToString().ToEntero()).FiltroPrimero("")
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=Row("CvePS").ToString().ToEntero()).FiltroPrimero("")
If DrPS IsNot Nothing Then
If DrPS("IVA").ToString().Contiene("-1", "") Then
Row("PorcentajeIVA") = PorcentajeIVA