-- mejora pago pesos en factura dólares, en redondeo

This commit is contained in:
2023-05-22 15:38:27 -07:00
parent 8265a891e0
commit 14ec1dfffc

View File

@@ -1398,10 +1398,9 @@ Partial Class Bancos_PopIECompras
Dim Pago As New CompraPago
Pago.Fecha = TxtFechaDocumento.Text.ToDate
Pago.CveMonedaPago = CveMoneda
ImportePagado = TxtImporte.Text.Trim.ToDecimal
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
'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
Pago.TCPago = 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
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 ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
Dim Referencia As String = TxtFolio.Text.Trim
Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal
Dim tImporteMN As Decimal = ImportePagado
Pago.ImportePago = tImporteMN
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
@@ -1480,7 +1479,7 @@ Partial Class Bancos_PopIECompras
End If
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)
Exit Sub
End If
@@ -1497,8 +1496,8 @@ Partial Class Bancos_PopIECompras
MsgError = "Error al registrar detalle de concepto bancario"
End If
Case "3" 'Ingresos X Comprobar
ImportePagado = TxtImporte.Text.Trim.ToDecimal
Case "3" 'Ingresos X Comprobar
Pago.ImportePago = ImportePagado
For Each rw As GridViewRow In GvIngresos.Rows
If rw.FCCheckBox("Chk").Checked Then
@@ -1854,8 +1853,6 @@ Partial Class Bancos_PopIECompras
End If
End Sub
End Class