cambio en redondeo de devoluciones

This commit is contained in:
2021-01-14 17:44:07 -07:00
parent e525416915
commit 1b36ab5069

View File

@@ -14235,11 +14235,20 @@ Partial Class Compras_Compras
Else
Dim Acumulado As Decimal = 0
Dim PU As Decimal = 0
Dim CantidadRenglones As Integer = 0
Dim ii As Integer = 0
For Each Dr As GridViewRow In GVDevolucion.Rows
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
CantidadRenglones += 1
End If
Next
For Each Dr As GridViewRow In GVDevolucion.Rows
If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)
PU = Dr.DataKey("PU").ToString.ToDecimal
If subtotal < Acumulado Then
ii += 1
If CantidadRenglones = ii Then
Dim dif As Decimal = subtotal - Acumulado
PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal
End If