aplicación multiple de ixc, en pesos y dólares
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user