Allow negative interest rate in PPMT() Financial function (#2164)
This commit is contained in:
parent
803737a893
commit
ebdeb231eb
|
|
@ -15,9 +15,6 @@ class CashFlowValidations extends FinancialValidations
|
|||
public static function validateRate($rate): float
|
||||
{
|
||||
$rate = self::validateFloat($rate);
|
||||
if ($rate < 0.0) {
|
||||
throw new Exception(Functions::NAN());
|
||||
}
|
||||
|
||||
return $rate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ return [
|
|||
-75.623186008367,
|
||||
[0.10 / 12, 1, 2 * 12, 2000],
|
||||
],
|
||||
[
|
||||
-91.597714484189,
|
||||
[-0.10 / 12, 1, 2 * 12, 2000],
|
||||
],
|
||||
[
|
||||
-27598.053462421,
|
||||
[0.08, 10, 10, 200000],
|
||||
|
|
|
|||
Loading…
Reference in New Issue