diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 9f9dcaf4e..0dd21d7fd 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -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"