mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add percentage to piggy bank view.
This commit is contained in:
@@ -50,6 +50,13 @@ class PiggybankRepetition extends Ardent
|
||||
];
|
||||
}
|
||||
|
||||
public function pct() {
|
||||
$total = $this->piggybank->targetamount;
|
||||
$saved = $this->currentamount;
|
||||
$pct = round(($saved / $total) * 100,1);
|
||||
return $pct;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user