Cambios en los reportes

This commit is contained in:
2021-04-21 18:06:25 -07:00
parent b382016c44
commit 5c6f77e0a7
8 changed files with 68 additions and 14 deletions

View File

@@ -5351,13 +5351,29 @@ Partial Class OC
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
Dim PU As Decimal = Row("Importe").ToString.ToDecimal() + (Row("Importe").ToString.ToDecimal() * PorcentajeGanancia)
Dim IEPSPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
Dim ImporteIEPS As Decimal = ((Cantidad * PU) * IEPSPS).RoundSQL(2)
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, "", UsuarioActual.CveUsuario) Then
Dim TotalCalculableImpuestos = (Cantidad * (PU))
Dim TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal)
Dim PorcentajeIEPS As Decimal = DrPS("IEPSPorcentaje").ToString.ToDecimal
Dim PorcentajeIVA As Decimal = 0D
If DrPS("IVA").ToString().Contiene("-1", "") Then
PorcentajeIVA = Row("IVAPorcentaje")
Else
PorcentajeIVA = DrPS("IVA")
End If
Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2)
Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2)
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then
OcurrioError = True
Exit For
End If
Next
Catch ex As Exception
OcurrioError = True