More chart optimisations.

This commit is contained in:
James Cole
2016-11-19 13:37:44 +01:00
parent ee6b72afa5
commit 50b72cf229
9 changed files with 229 additions and 170 deletions

View File

@@ -38,6 +38,17 @@ interface BudgetRepositoryInterface
*/
public function destroy(Budget $budget): bool;
/**
* Filters entries from the result set generated by getBudgetPeriodReport
*
* @param Collection $set
* @param int $budgetId
* @param array $periods
*
* @return array
*/
public function filterAmounts(Collection $set, int $budgetId, array $periods): array;
/**
* Find a budget.
*
@@ -79,6 +90,21 @@ interface BudgetRepositoryInterface
*/
public function getAllBudgetLimitRepetitions(Carbon $start, Carbon $end): Collection;
/**
* This method is being used to generate the budget overview in the year/multi-year report. More specifically, this
* method runs the query and returns the result that is used for this report.
*
* The query is used in both the year/multi-year budget overview AND in the accompanying chart.
*
* @param Collection $budgets
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): Collection;
/**
* @return Collection
*/