Correciones y redondeos para aplicacion de NC por anticipos con descuentos
This commit is contained in:
@@ -14287,6 +14287,7 @@ Partial Class Ventas
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
||||
Dim DescuentosAnticipos As Decimal = row2.DataKey("Descuentos").ToDecimal
|
||||
ImporteAnticipo = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / (row2.DataKey("TotalAnticipo").ToDecimal - DescuentosAnticipos) * row2.DataKey("SubTotalAnticipo").ToDecimal
|
||||
ImporteAnticipo = ImporteAnticipo.RoundSQL(2)
|
||||
End If
|
||||
|
||||
Dim Importe11MX As Decimal = ImporteAnticipo
|
||||
@@ -30167,6 +30168,11 @@ Partial Class Ventas
|
||||
Dim importePuTemp As Decimal = 0
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
|
||||
Dim DescuentoAplicado As Decimal = 0
|
||||
If AplicaDescuentos Then
|
||||
DescuentoAplicado = Porcentaje * TmpDT.SUMD("Descuento", FiltroStr)
|
||||
End If
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
importePuTemp = importePuTemp - TotalImpuestosLocalesVentaOriginal
|
||||
End If
|
||||
@@ -30186,8 +30192,8 @@ Partial Class Ventas
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal())
|
||||
|
||||
If AplicaDescuentos Then
|
||||
Dr("ImportePU") = importePuTemp + TmpDT.SUMD("Descuento", FiltroStr)
|
||||
Dr("Descuento") = Porcentaje * TmpDT.SUMD("Descuento", FiltroStr)
|
||||
Dr("ImportePU") = importePuTemp + DescuentoAplicado
|
||||
Dr("Descuento") = DescuentoAplicado
|
||||
Dr("ImporteTotal") = Dr("ImportePU").ToString().ToDecimal().RoundSQL(2)
|
||||
Else
|
||||
Dr("ImportePU") = importePuTemp
|
||||
|
||||
Reference in New Issue
Block a user