mensaje no coincide mensualidad

This commit is contained in:
rakcsle
2021-11-03 16:14:13 -07:00
parent d6b239b265
commit af5be05587

View File

@@ -1115,6 +1115,9 @@ Partial Class Bancos_Creditos
Dim Row As DataRow = Nothing
DTAmortizacion.Rows.Clear()
Dim MensajeImportesIncorrectos As Boolean = False
For i = 1 To TxtPlazo.Text.ToEntero
Row = DTAmortizacion.NewRow()
@@ -1142,9 +1145,17 @@ Partial Class Bancos_Creditos
Row("ImportePago") = 0
Row("Mensualidad") = Row("Capital").ToString.ToDecimal + Row("Intereses").ToString.ToDecimal + Row("Seguro").ToString.ToDecimal + Row("IVACapital").ToString.ToDecimal + Row("IVAIntereses").ToString.ToDecimal + Row("IVASeguro").ToString.ToDecimal
Dim ImporteMensualidad As Decimal = Row("Capital").ToString.ToDecimal + Row("Intereses").ToString.ToDecimal + Row("Seguro").ToString.ToDecimal + Row("IVACapital").ToString.ToDecimal + Row("IVAIntereses").ToString.ToDecimal + Row("IVASeguro").ToString.ToDecimal
Dim diferencia As Decimal = Math.Abs(ImporteMensualidad - TxtMensualidad.Text.ToDecimal)
If diferencia > 1 And Not MensajeImportesIncorrectos Then
Alert("El calculo de la mensualiadad Capital, Interes, seguro, IVA Capital, IVA Interes, IVA Seguro no coincide.", TipoMensaje.MsgAdvertencia)
MensajeImportesIncorrectos = True
End If
DTAmortizacion.Rows.Add(Row)
Next