Lots of new code for importer and some preferences.

This commit is contained in:
James Cole
2016-07-24 18:47:55 +02:00
parent 87c0f1d86e
commit 1392275b81
41 changed files with 1562 additions and 369 deletions

View File

@@ -24,6 +24,11 @@ use Illuminate\Support\Collection;
interface BudgetRepositoryInterface
{
/**
* @return bool
*/
public function cleanupBudgets(): bool;
/**
* @param Budget $budget
*
@@ -40,6 +45,15 @@ interface BudgetRepositoryInterface
*/
public function find(int $budgetId): Budget;
/**
* Find a budget.
*
* @param string $name
*
* @return Budget
*/
public function findByName(string $name): Budget;
/**
* This method returns the oldest journal or transaction date known to this budget.
* Will cache result.
@@ -92,15 +106,6 @@ interface BudgetRepositoryInterface
*/
public function journalsInPeriodWithoutBudget(Collection $accounts, Carbon $start, Carbon $end): Collection;
/**
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function spentInPeriodWithoutBudget(Collection $accounts, Carbon $start, Carbon $end): string;
/**
* @param Collection $budgets
* @param Collection $accounts
@@ -112,9 +117,13 @@ interface BudgetRepositoryInterface
public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end) : string;
/**
* @return bool
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return string
*/
public function cleanupBudgets(): bool;
public function spentInPeriodWithoutBudget(Collection $accounts, Carbon $start, Carbon $end): string;
/**
* @param array $data