-- mejora pago pesos en factura dólares, en redondeo
This commit is contained in:
@@ -1398,10 +1398,9 @@ Partial Class Bancos_PopIECompras
|
|||||||
Dim Pago As New CompraPago
|
Dim Pago As New CompraPago
|
||||||
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
||||||
Pago.CveMonedaPago = CveMoneda
|
Pago.CveMonedaPago = CveMoneda
|
||||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
|
||||||
'Tipos de cambio
|
'Tipos de cambio
|
||||||
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
|
||||||
Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
@@ -1433,7 +1432,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83)
|
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83)
|
||||||
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
||||||
Dim Referencia As String = TxtFolio.Text.Trim
|
Dim Referencia As String = TxtFolio.Text.Trim
|
||||||
Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal
|
Dim tImporteMN As Decimal = ImportePagado
|
||||||
Pago.ImportePago = tImporteMN
|
Pago.ImportePago = tImporteMN
|
||||||
|
|
||||||
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -1480,7 +1479,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
||||||
|
|
||||||
If TxtImporte.Text.ToDecimal > saldo Then
|
If ImportePagado > saldo Then
|
||||||
Alert("El importe no debe de superar el saldo del cheque seleccionado.", TipoMensaje.MsgAdvertencia)
|
Alert("El importe no debe de superar el saldo del cheque seleccionado.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -1498,7 +1497,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case "3" 'Ingresos X Comprobar
|
Case "3" 'Ingresos X Comprobar
|
||||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
|
||||||
Pago.ImportePago = ImportePagado
|
Pago.ImportePago = ImportePagado
|
||||||
For Each rw As GridViewRow In GvIngresos.Rows
|
For Each rw As GridViewRow In GvIngresos.Rows
|
||||||
If rw.FCCheckBox("Chk").Checked Then
|
If rw.FCCheckBox("Chk").Checked Then
|
||||||
@@ -1854,8 +1853,6 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user