--FIX ajuste por saldo al aplicar RNC por concepto

This commit is contained in:
JPerez
2025-06-09 15:12:13 -07:00
parent 2ea5dc7efd
commit 2da0b5b009
2 changed files with 7 additions and 2 deletions

View File

@@ -7699,7 +7699,7 @@
<div class="row" id="DivRNCCargosDetalle" runat="server" visible="false">
<div class="col-md-12" style="max-height: 440px; overflow: auto">
<asp:GridView ID="GvRemisionesNCDetalle" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveVenta,CveVentaDetalleRNC,CvePS,PU,PorcentajeIVA" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
DataKeyNames="CveVenta,CveVentaDetalleRNC,CvePS,PU,PorcentajeIVA,Saldo" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>

View File

@@ -36698,10 +36698,15 @@ Partial Class Ventas
Dim ImporteIVA As Decimal = (TotalCalculableImpuestos * PorcentajeIVA).RoundSQL(2)
Dim TotalRNCDetalle As Decimal = (TotalCalculableImpuestos + ImporteIVA)
Dim Saldo As Decimal = GvRow.DataKey("Saldo").ToDecimal()
'AJUSTAR SALDO SI EL TOTAL ES MAYOR
If TotalRNCDetalle > Saldo Then
TotalRNCDetalle = Saldo
End If
TotalRNC += TotalRNCDetalle
End If
End If