From 861775321282a5a5a98421ea75178ad5e2067d29 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 7 May 2025 20:31:15 -0700 Subject: [PATCH] =?UTF-8?q?aplicaci=C3=B3n=20multiple=20de=20ixc,=20en=20p?= =?UTF-8?q?esos=20y=20d=C3=B3lares?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/ClientesAbonar.aspx.vb | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index f3935ceec..0a09cd780 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -821,14 +821,10 @@ Partial Class Ventas_ClientesAbonar 'comparativo. For Each gvr As GridViewRow In GvCxC.Rows If gvr.FCCheckBox("Chk").Checked Then - Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero - If CveMonedaVenta = CveMonedaPago Then - ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal() - ElseIf CveMonedaVenta = 2 And CveMonedaPago = 1 Then - ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TxtTC.Text.ToDecimal) - ElseIf CveMonedaVenta = 1 And CveMonedaPago = 2 Then - ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() / TxtTC.Text.ToDecimal) - End If + 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() @@ -948,21 +944,8 @@ Partial Class Ventas_ClientesAbonar End If Else If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc - CveIE = DdlIngreso.SelectedValue.ToEntero - - If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then - CveMoneda = ObjIE.CveMoneda - Else - MsgError = "Error al obtener la moneda de ingreso por comprobar" - End If - - 'If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2 - 'If ChkPagarDolares.Checked Then CveMoneda = 2 - 'If ChkPagarPesos.Checked Then CveMoneda = 1 - End If - End If If CveIE > 0 OrElse RblTipoPago.SelectedValue.Contiene("2", "3") Then @@ -988,10 +971,8 @@ Partial Class Ventas_ClientesAbonar Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim TipoCambioFluctuacion As Decimal = 1 Dim FechaUltimaFluctuacion As Date = MinFecha - Dim tFecha As Date = TxtFechaDocumento.Text.ToDate Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - Dim ImportePrestamo As Decimal = 0 Dim TCPrestamo As Decimal = 0 @@ -1087,10 +1068,7 @@ Partial Class Ventas_ClientesAbonar 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 = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal - 'Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal - 'ImportePagadoVenta = (ImportePagadoVenta / TxtTipoCambio.Text.ToDecimal).RoundSQL + Pago.ImportePago = (Pago.ImportePago * TxtTC.Text.ToDecimal).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