-- 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 MsgError As String = ""
Dim Inserta As Boolean = True Dim Inserta As Boolean = True
Dim ImportePagado As Decimal = 0 Dim ImportePagado As Decimal = 0
Dim ImportePagadoVenta As Decimal = 0
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
If Not EmpresaPrueba Then CveIE = -1 If Not EmpresaPrueba Then CveIE = -1
@@ -1243,18 +1244,18 @@ Partial Class Bancos_PopIEVentas
Else Else
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
End If End If
ImportePagadoVenta = ImportePagado
'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 = 1 / TxtTipoCambio.Text.ToDecimal '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 ImportePagadoVenta = (ImportePagado / TxtTipoCambio.Text.ToDecimal).RoundSQL
Pago.TCPago = 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
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 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 End If
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal 'If ChkPagarPesos.Checked Then Pago.TCPago = 1 / TxtTipoCambio.Text.ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = 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 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 If CveIE > 0 Then
Pago.ImportePago = ImportePagado Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso Pago.ImportePagoVenta = ImportePagadoVenta
Pago.CveIE = CveIE Pago.CveIE = CveIE
Pago.TipoPago = "B" Pago.TipoPago = "B"