Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/wizards/newloanwizard/knewloanwizard_p.h
Context not available. | |||||
356 | // calculate the number of payments out of the other information | 356 | // calculate the number of payments out of the other information | ||
---|---|---|---|---|---|
357 | val = calc.numPayments(); | 357 | val = calc.numPayments(); | ||
358 | if (val == 0) | 358 | if (val == 0) | ||
359 | throw MYMONEYEXCEPTION("incorrect fincancial calculation"); | 359 | throw MYMONEYEXCEPTION_CSTRING("incorrect fincancial calculation"); | ||
360 | 360 | | |||
361 | // if the number of payments has a fractional part, then we | 361 | // if the number of payments has a fractional part, then we | ||
362 | // round it to the smallest integer and calculate the balloon payment | 362 | // round it to the smallest integer and calculate the balloon payment | ||
Context not available. | |||||
389 | || (q->field("lendButton").toBool() && val > 0 && qAbs(val) > qAbs(calc.payment()))) { | 389 | || (q->field("lendButton").toBool() && val > 0 && qAbs(val) > qAbs(calc.payment()))) { | ||
390 | // case a) | 390 | // case a) | ||
391 | qDebug("Future Value is %f", val); | 391 | qDebug("Future Value is %f", val); | ||
392 | throw MYMONEYEXCEPTION("incorrect fincancial calculation"); | 392 | throw MYMONEYEXCEPTION_CSTRING("incorrect fincancial calculation"); | ||
393 | 393 | | |||
394 | } else if ((q->field("borrowButton").toBool() && val < 0 && qAbs(val) <= qAbs(calc.payment())) | 394 | } else if ((q->field("borrowButton").toBool() && val < 0 && qAbs(val) <= qAbs(calc.payment())) | ||
395 | || (q->field("lendButton").toBool() && val > 0 && qAbs(val) <= qAbs(calc.payment()))) { | 395 | || (q->field("lendButton").toBool() && val > 0 && qAbs(val) <= qAbs(calc.payment()))) { | ||
Context not available. | |||||
402 | 402 | | |||
403 | if (q->field("finalPaymentEditValid").toBool()) { | 403 | if (q->field("finalPaymentEditValid").toBool()) { | ||
404 | if ((q->field("finalPaymentEdit").value<MyMoneyMoney>().abs() - refVal.abs()).abs().toDouble() > 1) { | 404 | if ((q->field("finalPaymentEdit").value<MyMoneyMoney>().abs() - refVal.abs()).abs().toDouble() > 1) { | ||
405 | throw MYMONEYEXCEPTION("incorrect fincancial calculation"); | 405 | throw MYMONEYEXCEPTION_CSTRING("incorrect fincancial calculation"); | ||
406 | } | 406 | } | ||
407 | result = i18n("KMyMoney has successfully verified your loan information."); | 407 | result = i18n("KMyMoney has successfully verified your loan information."); | ||
408 | } | 408 | } | ||
Context not available. |