mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
autofixes
This commit is contained in:
parent
1c2ecda287
commit
f991f15889
|
|
@ -162,23 +162,23 @@ final class Loan
|
||||||
|
|
||||||
while ($previous['loan'] > 0.0) {
|
while ($previous['loan'] > 0.0) {
|
||||||
$new = [
|
$new = [
|
||||||
'loan' => 0.0,
|
'loan' => 0.0,
|
||||||
'total' => 0.0,
|
'total' => 0.0,
|
||||||
'interest' => 0.0,
|
'interest' => 0.0,
|
||||||
'principal' => 0.0,
|
'principal' => 0.0,
|
||||||
];
|
];
|
||||||
|
|
||||||
$new['total'] = \round(self::getAmortizationLoanPayment($previous['loan'], $r, $duration, $interval), 2);
|
$new['total'] = \round(self::getAmortizationLoanPayment($previous['loan'], $r, $duration, $interval), 2);
|
||||||
$new['interest'] = \round(self::getAmortizationLoanInterest($previous['loan'], $r, $interval), 2);
|
$new['interest'] = \round(self::getAmortizationLoanInterest($previous['loan'], $r, $interval), 2);
|
||||||
$new['principal'] = \round($new['total'] - $new['interest'], 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) {
|
if ($new['loan'] < 0.01) {
|
||||||
$new['loan'] = 0.0;
|
$new['loan'] = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$schedule[] = $new;
|
$schedule[] = $new;
|
||||||
$previous = $new;
|
$previous = $new;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $schedule;
|
return $schedule;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ return [
|
||||||
[
|
[
|
||||||
'dest' => '\phpOMS\tess\Application\Apps\Testapp\Controller\Controller:testEndpoint',
|
'dest' => '\phpOMS\tess\Application\Apps\Testapp\Controller\Controller:testEndpoint',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'state' => 2,
|
'state' => 2,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user