From 89fdba710ecacbcf36a2d28612584545c893b52b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 6 May 2025 09:13:28 -0700 Subject: [PATCH] -- monedas en ixc --- Ventas/ClientesAbonar.aspx.vb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 216ca1ed8..11578c1be 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -815,11 +815,16 @@ Partial Class Ventas_ClientesAbonar If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}") + Dim tCveMonedaIE As Integer = DtSaldo.FiltroPrimeroValor("CveMoneda", "").ToEntero Dim ImporteAbonar As Decimal = 0 - + Dim TC As Decimal = 1 + 'comparativo. For Each gvr As GridViewRow In GvCxC.Rows If gvr.FCCheckBox("Chk").Checked Then - ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal() + TC = 1 + If tCveMonedaIE = 1 AndAlso gvr.DataKey("CveMoneda") = "2" Then TC = TxtTC.Text.ToDecimal + If tCveMonedaIE = 2 AndAlso gvr.DataKey("CveMoneda") = "1" Then TC = 1D / TxtTC.Text.ToDecimal + ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TC).RoundSQL(2) End If Next ImporteAbonar += TxtAnticipo.Text.ToDecimal() @@ -1067,10 +1072,10 @@ Partial Class Ventas_ClientesAbonar Pago.FechaDocumentoRelacionado = FechaIngreso Pago.CveClientePago = CveCliente End If - 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos Pago.TCPago = TxtTC.Text.ToDecimal + Pago.ImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES