mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 06:43:23 +00:00
Rename fields for piggy bank
This commit is contained in:
@@ -50,15 +50,15 @@ class FrontpageController extends Controller
|
||||
if (1 === bccomp($amount, '0')) {
|
||||
// percentage!
|
||||
$pct = 0;
|
||||
if (0 !== bccomp($piggyBank->targetamount, '0')) {
|
||||
$pct = (int)bcmul(bcdiv($amount, $piggyBank->targetamount), '100');
|
||||
if (0 !== bccomp($piggyBank->target_amount, '0')) {
|
||||
$pct = (int)bcmul(bcdiv($amount, $piggyBank->target_amount), '100');
|
||||
}
|
||||
|
||||
$entry = [
|
||||
'id' => $piggyBank->id,
|
||||
'name' => $piggyBank->name,
|
||||
'amount' => $amount,
|
||||
'target' => $piggyBank->targetamount,
|
||||
'target' => $piggyBank->target_amount,
|
||||
'percentage' => $pct,
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user