mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-10-12 16:32:04 -05:00
Merge pull request #4503 from Aethiran/develop
Fixed amountPerPeriod not respecting bill skips
This commit is contained in:
1 file changed
+2
-2
@@ -211,8 +211,8 @@ class IndexController extends Controller
|
||||
'monthly' => '12',
|
||||
'weekly' => '52.17',
|
||||
];
|
||||
$yearAmount = bcmul($avg, $multiplies[$bill['repeat_freq']]);
|
||||
Log::debug(sprintf('Amount per year is %s (%s * %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']]));
|
||||
$yearAmount = bcmul($avg, bcdiv($multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1)));
|
||||
Log::debug(sprintf('Amount per year is %s (%s * %s / %s)', $yearAmount, $avg, $multiplies[$bill['repeat_freq']], (string)($bill['skip'] + 1)));
|
||||
|
||||
// per period:
|
||||
$division = [
|
||||
|
||||
Reference in new issue
Block a user