--recalcular importe si tiene IVA

This commit is contained in:
2024-02-20 16:05:53 -07:00
parent cd4933b261
commit 7872f965f3

View File

@@ -438,7 +438,26 @@ Partial Class Boletos
Return Retorno
End If
If Not ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0, CveViajePasajero:=Dr("CveViajePasajero").ToString().ToEntero()) Then
Dim PorcentajeIVA As Decimal = 0
Dim DrPS As DataRow = ClsPaginas.GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSBoleto).FiltroPrimero("") ' Estado = -1
If DrPS Is Nothing Then
Retorno.Mensajes.Add("No se pudo agregar el producto")
Return Retorno
End If
If DrPS("IVA").ToString().Contiene("-1", "") Then
PorcentajeIVA = ObjFactura.SubProyecto.IVA
Else
PorcentajeIVA = DrPS("IVA").ToString().ToDecimal()
End If
If PorcentajeIVA > 0 Then
Importe = (Importe / (1D + PorcentajeIVA)).RoundSQL(6)
End If
If Not ObjFactura.AgregarPS(CvePSBoleto, 1D, Importe, 0D, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=PorcentajeIVA, CveViajePasajero:=Dr("CveViajePasajero").ToString().ToEntero()) Then
Retorno.Mensajes.Add("No se pudo agregar el producto")
Return Retorno
End If