mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Method no longer used.
This commit is contained in:
@@ -233,20 +233,15 @@ class BudgetController extends Controller
|
||||
$journals = $repository->getJournals($budget, $repetition);
|
||||
|
||||
if (is_null($repetition->id)) {
|
||||
$start = $repository->firstActivity($budget);
|
||||
$end = new Carbon;
|
||||
$set = $budget->limitrepetitions()->orderBy('startdate', 'DESC')->get();
|
||||
//$set = $repository->getBudgetLimits($budget);
|
||||
//$subTitle = e($budget->name);
|
||||
$start = $repository->firstActivity($budget);
|
||||
$end = new Carbon;
|
||||
$set = $budget->limitrepetitions()->orderBy('startdate', 'DESC')->get();
|
||||
$subTitle = e($budget->name);
|
||||
} else {
|
||||
$start = $repetition->startdate;
|
||||
$end = $repetition->enddate;
|
||||
$set = new Collection([$repetition]);
|
||||
// $spentArray = $repository->spentPerDay($budget, $start, $end);
|
||||
// $budgetLimit = $repetition->budgetLimit;
|
||||
// $budgetLimit->spent = $this->getSumOfRange($start, $end, $spentArray); // bit weird but it works.
|
||||
// $limits = new Collection([$budgetLimit]);
|
||||
//$subTitle = trans('firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]);
|
||||
$start = $repetition->startdate;
|
||||
$end = $repetition->enddate;
|
||||
$set = new Collection([$repetition]);
|
||||
$subTitle = trans('firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]);
|
||||
}
|
||||
|
||||
$spentArray = $repository->spentPerDay($budget, $start, $end);
|
||||
@@ -258,13 +253,6 @@ class BudgetController extends Controller
|
||||
$limits->push($entry);
|
||||
}
|
||||
|
||||
// loop limits and set the amount spent for each limit.
|
||||
// /** @var BudgetLimit $budgetLimit */
|
||||
// foreach ($set as $budgetLimit) {
|
||||
// $start = $budgetLimit->startdate;
|
||||
// $end = $budgetLimit->lim
|
||||
// }
|
||||
|
||||
$journals->setPath('/budgets/show/' . $budget->id);
|
||||
|
||||
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle'));
|
||||
|
Reference in New Issue
Block a user