diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index a9ca68b14..570e317ec 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -5801,11 +5801,12 @@ CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn"> - - - - + + + + + 0 Then - nRow("IVA") = ivaParcial - nRow("RetIVA") = retIvaParcial - nRow("RetISR") = retIsrParcial + nRow("IVA") = ivaParcial.RoundSQL(4) + nRow("RetIVA") = retIvaParcial.RoundSQL(4) + nRow("RetISR") = retIsrParcial.RoundSQL(4) Else - nRow("IVA") = (ivaParcial / subtotalParcial) - nRow("RetIVA") = (retIvaParcial / subtotalParcial) - nRow("RetISR") = (retIsrParcial / subtotalParcial) + nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4) + nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4) + nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4) End If - nRow("Total") = totalParcialDeseado - nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial) + nRow("SubTotal") = subtotalParcial.RoundSQL(4) + + nRow("Total") = totalParcialDeseado.RoundSQL(4) + nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4) + nRow("Porcentaje") = ((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2) + nRow("CveUM") = CveUM nRow("UM") = UM @@ -22547,8 +22549,8 @@ Partial Class Compras_Compras Function ProrateoCalculaRestante(Optional MostrarMensaje As Boolean = False) As Boolean - Dim Acumulado As Decimal = DTProrrateoGasolina.SUM("Total") - Dim Total As Decimal = TxtTotal.Text.ToDecimal + Dim Acumulado As Decimal = DTProrrateoGasolina.SUM("Total").RoundSQL(2) + Dim Total As Decimal = TxtTotal.Text.ToDecimal.RoundSQL(2) Dim Respuesta As Boolean = False LblRestoProrrateoGasolina.Text = (Total - Acumulado).ToString("###,###,###.00") @@ -22560,7 +22562,7 @@ Partial Class Compras_Compras If MostrarMensaje Then If Acumulado <> Total Then - Alert($"El importe prorrateado es diferenque del total, Total:{Total.ToString("###,###,###.00")}, Prorrateado:{Acumulado.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia) + Alert($"El importe prorrateado es diferente del total, Diferencia: {(Acumulado - Total).Abs()}, Total:{Total.ToString("###,###,###.00")}, Prorrateado:{Acumulado.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia) End If End If