mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-11-02 20:30:37 -06:00
Add percentage to piggy bank view.
This commit is contained in:
1 parent
71504c76ac
commit
c272d99fa8
2 files changed
+9
-2
No files matched your search
@@ -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