Month report optimised.

This commit is contained in:
James Cole
2016-01-01 19:46:12 +01:00
parent 54ede8aa18
commit 59731878f6
7 changed files with 177 additions and 52 deletions

View File

@@ -15,6 +15,10 @@ use Illuminate\Support\Collection;
*/
interface BudgetRepositoryInterface
{
/**
* @return void
*/
@@ -51,6 +55,19 @@ interface BudgetRepositoryInterface
*/
public function getExpensesPerMonth(Budget $budget, Carbon $start, Carbon $end);
/**
* Returns a list of expenses (in the field "spent", grouped per budget per account.
*
* @param Collection $budgets
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function spentPerBudgetPerAccount(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end);
/**
* Returns an array with the following key:value pairs:
*
@@ -84,6 +101,8 @@ interface BudgetRepositoryInterface
*/
public function spentPerDayForAccounts(Budget $budget, Collection $accounts, Carbon $start, Carbon $end);
/**
* Returns an array with the following key:value pairs:
*