Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix forgotten call in bill repository.
James Cole6b750c909a9b
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.phpindex 91f4a794cd..ded8eba0ec 100644--- a/app/Repositories/Bill/BillRepository.php+++ b/app/Repositories/Bill/BillRepository.php@@ -498,22 +498,21 @@ class BillRepository implements BillRepositoryInterface{$accounts = app('FireflyIII\Repositories\Account\AccountRepositoryInterface');- $creditCards = $accounts->getCreditCards();+ $creditCards = $accounts->getCreditCards($end);$paid = $set->get('paid');$unpaid = $set->get('unpaid');foreach ($creditCards as $creditCard) {- $balance = Steam::balance($creditCard, $end, true);$date = new Carbon($creditCard->getMeta('ccMonthlyPaymentDate'));- if ($balance < 0) {+ if ($creditCard->balance < 0) {// unpaid! create a fake bill that matches the amount.$description = $creditCard->name;- $amount = $balance * -1;+ $amount = $creditCard->balance * -1;$fakeBill = $this->createFakeBill($description, $date, $amount);unset($description, $amount);$unpaid->push([$fakeBill, $date]);}- if ($balance == 0) {+ if ($creditCard->balance == 0) {// find transfer(s) TO the credit card which should account for// anything paid. If not, the CC is not yet used.$journals = $accounts->getTransfersInRange($creditCard, $start, $end);