-- mejora pago en pesos, factura dlls

This commit is contained in:
2024-07-23 09:11:21 -07:00
parent f9e2d478c7
commit 620ce13087

View File

@@ -1163,6 +1163,7 @@ Partial Class Bancos_PopIEVentas
Dim MsgError As String = ""
Dim Inserta As Boolean = True
Dim ImportePagado As Decimal = 0
Dim ImportePagadoVenta As Decimal = 0
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
If Not EmpresaPrueba Then CveIE = -1
@@ -1243,18 +1244,18 @@ Partial Class Bancos_PopIEVentas
Else
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
End If
ImportePagadoVenta = ImportePagado
'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 = 1 / TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
End If
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal
'Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
ImportePagadoVenta = (ImportePagado / 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
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
End If
'If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = TxtTipoCambio.Text.ToDecimal
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
@@ -1266,7 +1267,7 @@ Partial Class Bancos_PopIEVentas
If CveIE > 0 Then
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso
Pago.ImportePagoVenta = ImportePagadoVenta
Pago.CveIE = CveIE
Pago.TipoPago = "B"