-- monedas en ixc
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user