diff --git a/Business/Finance/Loan.php b/Business/Finance/Loan.php index 647e02c96..0e3f7fc6e 100755 --- a/Business/Finance/Loan.php +++ b/Business/Finance/Loan.php @@ -162,23 +162,23 @@ final class Loan while ($previous['loan'] > 0.0) { $new = [ - 'loan' => 0.0, - 'total' => 0.0, - 'interest' => 0.0, + 'loan' => 0.0, + 'total' => 0.0, + 'interest' => 0.0, 'principal' => 0.0, ]; - $new['total'] = \round(self::getAmortizationLoanPayment($previous['loan'], $r, $duration, $interval), 2); - $new['interest'] = \round(self::getAmortizationLoanInterest($previous['loan'], $r, $interval), 2); + $new['total'] = \round(self::getAmortizationLoanPayment($previous['loan'], $r, $duration, $interval), 2); + $new['interest'] = \round(self::getAmortizationLoanInterest($previous['loan'], $r, $interval), 2); $new['principal'] = \round($new['total'] - $new['interest'], 2); - $new['loan'] = \max(0, \round($previous['loan'] - $new['principal'], 2)); + $new['loan'] = \max(0, \round($previous['loan'] - $new['principal'], 2)); if ($new['loan'] < 0.01) { $new['loan'] = 0.0; } $schedule[] = $new; - $previous = $new; + $previous = $new; } return $schedule; diff --git a/tests/Application/Testapp/Admin/Install/Application/Routes.php b/tests/Application/Testapp/Admin/Install/Application/Routes.php index 72e0d4f13..cacc83c0d 100755 --- a/tests/Application/Testapp/Admin/Install/Application/Routes.php +++ b/tests/Application/Testapp/Admin/Install/Application/Routes.php @@ -19,7 +19,7 @@ return [ [ 'dest' => '\phpOMS\tess\Application\Apps\Testapp\Controller\Controller:testEndpoint', 'verb' => RouteVerb::GET, - 'active' => true, + 'active' => true, 'permission' => [ 'type' => 1, 'state' => 2,