mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixed some reports.
This commit is contained in:
@@ -308,12 +308,14 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function leftOnAccount(Account $account)
|
||||
public function leftOnAccount(Account $account, Carbon $date)
|
||||
{
|
||||
$balance = Steam::balance($account, null, true);
|
||||
|
||||
$balance = Steam::balance($account, $date, true);
|
||||
/** @var PiggyBank $p */
|
||||
foreach ($account->piggybanks()->get() as $p) {
|
||||
$balance -= $p->currentRelevantRep()->currentamount;
|
||||
|
@@ -115,10 +115,11 @@ interface AccountRepositoryInterface
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function leftOnAccount(Account $account);
|
||||
public function leftOnAccount(Account $account, Carbon $date);
|
||||
|
||||
/**
|
||||
* @param Account $account
|
||||
|
Reference in New Issue
Block a user