diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 6690811f6..6cf2c2d90 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -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