-- corrección de recalcular impuestos al cambiar de ps

This commit is contained in:
2023-08-11 18:36:31 -07:00
parent b83cfc0eeb
commit bf648fe469

View File

@@ -4038,19 +4038,6 @@ Partial Class OC_OC
IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDecimal
IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
RetISR = DrPS("RetISR").ToString.ToDecimal
RetIVA = DrPS("RetIVA").ToString.ToDecimal
If Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) = 0.08 Then
RetIVA = RetIVA / 2
End If
'If IvaPS = -1 Then 'IVA DE LA SUCURSAL
' IvaPS = GlobalDTSubProyectos(-1, gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero).FiltroPrimeroValor("IVA").ToDecimal
'End If
' IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
End If
If DdlProveedores.SelectedValue.ToEntero > 0 Then
'Si es Proveedor Extranjero el IVA es 0%
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
@@ -4065,6 +4052,17 @@ Partial Class OC_OC
End If
End If
If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
RetISR = DrPS("RetISR").ToString.ToDecimal
RetIVA = DrPS("RetIVA").ToString.ToDecimal
If Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) = 0.08 Then
RetIVA = RetIVA / 2
End If
IvaPS = -1
End If
CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text