--FIX otros ingresos

This commit is contained in:
2025-02-28 18:05:05 -07:00
parent 0c29f738b9
commit 24eb454982

View File

@@ -1243,16 +1243,21 @@ Partial Class Bancos_PopIEVentas
Pago.Fecha = TxtFechaDocumento.Text.ToDate
Pago.CveMonedaPago = CveMoneda
Pago.Referencia = VentaActual.SerieFolio
If TxtComision.Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = TxtComision.Text.ToDecimal Else Pago.OtroGastoIngreso = 0
If DdlOtrosPagos.SelectedValue = "2" Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL + TxtComision.Text.ToDecimal
Else
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
End If
ImportePagadoVenta = ImportePagado
ImportePagadoVenta = ImportePagado - Pago.OtroGastoIngreso
'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
ImportePagadoVenta = (ImportePagado / TxtTipoCambio.Text.ToDecimal).RoundSQL
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
Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
@@ -1261,8 +1266,6 @@ Partial Class Bancos_PopIEVentas
'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
Select Case RBLContado.SelectedValue
Case "1" ' Banco
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, Pago.TCPago, TxtObservaciones.Text.Trim, "",
@@ -1286,7 +1289,7 @@ Partial Class Bancos_PopIEVentas
Case "2" ' FyE
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado - Pago.OtroGastoIngreso
Pago.ImportePagoVenta = ImportePagadoVenta
Pago.TipoPago = "FyE"
Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString