mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code clean up.
This commit is contained in:
@@ -365,7 +365,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
*/
|
||||
public function update(PiggyBank $piggyBank, array $data): PiggyBank
|
||||
{
|
||||
|
||||
$piggyBank->name = $data['name'];
|
||||
$piggyBank->account_id = intval($data['account_id']);
|
||||
$piggyBank->targetamount = round($data['targetamount'], 2);
|
||||
@@ -380,7 +379,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
// remove money from the rep.
|
||||
$repetition = $piggyBank->currentRelevantRep();
|
||||
if ($repetition->currentamount > $piggyBank->targetamount) {
|
||||
|
||||
$diff = bcsub($piggyBank->targetamount, $repetition->currentamount);
|
||||
$this->createEvent($piggyBank, $diff);
|
||||
|
||||
|
Reference in New Issue
Block a user