aplicación multiple de ixc, en pesos y dólares
This commit is contained in:
@@ -821,14 +821,10 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
'comparativo.
|
'comparativo.
|
||||||
For Each gvr As GridViewRow In GvCxC.Rows
|
For Each gvr As GridViewRow In GvCxC.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero
|
TC = 1
|
||||||
If CveMonedaVenta = CveMonedaPago Then
|
If tCveMonedaIE = 1 AndAlso gvr.DataKey("CveMoneda") = "2" Then TC = TxtTC.Text.ToDecimal
|
||||||
ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal()
|
If tCveMonedaIE = 2 AndAlso gvr.DataKey("CveMoneda") = "1" Then TC = 1D / TxtTC.Text.ToDecimal
|
||||||
ElseIf CveMonedaVenta = 2 And CveMonedaPago = 1 Then
|
ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TC).RoundSQL(2)
|
||||||
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
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
|
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
|
||||||
@@ -948,21 +944,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
||||||
|
|
||||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
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
|
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
|
End If
|
||||||
|
|
||||||
If CveIE > 0 OrElse RblTipoPago.SelectedValue.Contiene("2", "3") Then
|
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 FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||||
Dim TipoCambioFluctuacion As Decimal = 1
|
Dim TipoCambioFluctuacion As Decimal = 1
|
||||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||||
|
|
||||||
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||||
|
|
||||||
Dim ImportePrestamo As Decimal = 0
|
Dim ImportePrestamo As Decimal = 0
|
||||||
Dim TCPrestamo As Decimal = 0
|
Dim TCPrestamo As Decimal = 0
|
||||||
|
|
||||||
@@ -1087,10 +1068,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
'Tipos de cambio
|
'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
|
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 * TxtTC.Text.ToDecimal).RoundSQL
|
||||||
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
|
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
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)
|
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
|
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