mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 04:19:12 +00:00
Rename various methods.
This commit is contained in:
@@ -138,12 +138,12 @@ class PopupReport implements PopupReportInterface
|
||||
|
||||
$collector->setAccounts(new Collection([$account]))->setRange($attributes['startDate'], $attributes['endDate'])
|
||||
->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]);
|
||||
$journals = $collector->getTransactions();
|
||||
$transactions = $collector->getTransactions();
|
||||
|
||||
$report = $attributes['accounts']->pluck('id')->toArray(); // accounts used in this report
|
||||
|
||||
// filter for transfers and withdrawals TO the given $account
|
||||
$journals = $journals->filter(
|
||||
$transactions = $transactions->filter(
|
||||
function (Transaction $transaction) use ($report, $repository) {
|
||||
// get the destinations:
|
||||
$sources = $repository->getJournalSourceAccounts($transaction->transactionJournal)->pluck('id')->toArray();
|
||||
@@ -153,7 +153,7 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
);
|
||||
|
||||
return $journals;
|
||||
return $transactions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,11 +173,11 @@ class PopupReport implements PopupReportInterface
|
||||
$collector = app(TransactionCollectorInterface::class);
|
||||
$collector->setAccounts(new Collection([$account]))->setRange($attributes['startDate'], $attributes['endDate'])
|
||||
->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]);
|
||||
$journals = $collector->getTransactions();
|
||||
$transactions = $collector->getTransactions();
|
||||
$report = $attributes['accounts']->pluck('id')->toArray(); // accounts used in this report
|
||||
|
||||
// filter the set so the destinations outside of $attributes['accounts'] are not included.
|
||||
$journals = $journals->filter(
|
||||
$transactions = $transactions->filter(
|
||||
function (Transaction $transaction) use ($report, $repository) {
|
||||
// get the destinations:
|
||||
$journal = $transaction->transactionJournal;
|
||||
@@ -188,6 +188,6 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
);
|
||||
|
||||
return $journals;
|
||||
return $transactions;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class ReportHelper implements ReportHelperInterface
|
||||
/** @var TransactionCollectorInterface $collector */
|
||||
$collector = app(TransactionCollectorInterface::class);
|
||||
$collector->setAccounts($accounts)->setRange($payDate, $endOfPayPeriod)->setBills($bills);
|
||||
$journals = $collector->getTransactions();
|
||||
$transactions = $collector->getTransactions();
|
||||
|
||||
$billLine = new BillLine;
|
||||
$billLine->setBill($bill);
|
||||
@@ -95,7 +95,7 @@ class ReportHelper implements ReportHelperInterface
|
||||
$billLine->setMin((string)$bill->amount_min);
|
||||
$billLine->setMax((string)$bill->amount_max);
|
||||
$billLine->setHit(false);
|
||||
$entry = $journals->filter(
|
||||
$entry = $transactions->filter(
|
||||
function (Transaction $transaction) use ($bill) {
|
||||
return $transaction->bill_id === $bill->id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user