This breaks everything budget-related.

This commit is contained in:
James Cole
2016-05-05 22:03:35 +02:00
parent dd8b500efd
commit adf6691470
7 changed files with 1219 additions and 1223 deletions

View File

@@ -68,8 +68,8 @@ class BalanceReportHelper implements BalanceReportHelperInterface
// build a balance header:
$header = new BalanceHeader;
$budgets = $this->budgetRepository->getBudgetsAndLimitsInRange($start, $end);
$spentData = $this->budgetRepository->spentPerBudgetPerAccount($budgets, $accounts, $start, $end);
$budgets = new Collection;// $this->budgetRepository->getBudgetsAndLimitsInRange($start, $end); // TODO BUDGET getBudgets
$spentData = new Collection; // $this->budgetRepository->spentPerBudgetPerAccount($budgets, $accounts, $start, $end); TODO BUDGET journalsInPeriod
foreach ($accounts as $account) {
$header->addAccount($account);
}

View File

@@ -41,7 +41,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
$repository = app(BudgetRepositoryInterface::class);
$set = $repository->getBudgets();
$allRepetitions = $repository->getAllBudgetLimitRepetitions($start, $end);
$allTotalSpent = $repository->spentAllPerDayForAccounts($accounts, $start, $end);
$allTotalSpent = '0'; //$repository->spentAllPerDayForAccounts($accounts, $start, $end);// TODO BUDGET MASSIVELY STUPID SPECIFIC METHOD
foreach ($set as $budget) {
@@ -98,7 +98,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
}
// stuff outside of budgets:
$noBudget = $repository->getWithoutBudgetSum($accounts, $start, $end);
$noBudget = '0'; //$repository->getWithoutBudgetSum($accounts, $start, $end); // TODO BUDGET journalsInPeriodWithoutBudget
$budgetLine = new BudgetLine;
$budgetLine->setOverspent($noBudget);
$budgetLine->setSpent($noBudget);
@@ -124,7 +124,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
$set = new Collection;
/** @var Budget $budget */
foreach ($budgets as $budget) {
$expenses = $repository->spentPerDay($budget, $start, $end, $accounts);
$expenses = [0]; // $repository->spentPerDay($budget, $start, $end, $accounts); // TODO BUDGET spentInPeriod
$total = strval(array_sum($expenses));
if (bccomp($total, '0') === -1) {
$set->push($budget);