Skip to content

Firefly III: a personal finances manager

Method no longer used.

James Cole2f131dc17084
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index fa0db398ba..71886abeca 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -280,43 +280,6 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
return $return;
}
- /**
- * Returns an array with the following key:value pairs:
- *
- * yyyy-mm-dd:<amount>
- *
- * Where yyyy-mm-dd is the date and <amount> is the money spent using DEPOSITS in the $budget
- * from all the users accounts.
- *
- * @param Budget $budget
- * @param Collection $accounts
- * @param Carbon $start
- * @param Carbon $end
- *
- * @return array
- */
- public function spentPerDayForAccounts(Budget $budget, Collection $accounts, Carbon $start, Carbon $end)
- {
- $ids = $accounts->pluck('id')->toArray();
- /** @var Collection $query */
- $query = $budget->transactionJournals()
- ->transactionTypes([TransactionType::WITHDRAWAL])
- ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
- ->whereIn('transactions.account_id', $ids)
- ->where('transactions.amount', '<', 0)
- ->before($end)
- ->after($start)
- ->groupBy('dateFormatted')->get(['transaction_journals.date as dateFormatted', DB::Raw('SUM(`transactions`.`amount`) AS `sum`')]);
-
- $return = [];
- foreach ($query->toArray() as $entry) {
- $return[$entry['dateFormatted']] = $entry['sum'];
- }
-
- return $return;
- }
-
-
/**
* @return Collection
*/
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index 3ba1b8c1d8..890ebf785a 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -84,25 +84,6 @@ interface BudgetRepositoryInterface
*/
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end);
- /**
- * Returns an array with the following key:value pairs:
- *
- * yyyy-mm-dd:<amount>
- *
- * Where yyyy-mm-dd is the date and <amount> is the money spent using WITHDRAWALS in the $budget
- * from the given users accounts..
- *
- * @param Budget $budget
- * @param Collection $accounts
- * @param Carbon $start
- * @param Carbon $end
- *
- * @return array
- */
- public function spentPerDayForAccounts(Budget $budget, Collection $accounts, Carbon $start, Carbon $end);
-
-
-
/**
* Returns an array with the following key:value pairs:
*