mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Method no longer used.
This commit is contained in:
@@ -236,17 +236,12 @@ class BudgetController extends Controller
|
|||||||
$start = $repository->firstActivity($budget);
|
$start = $repository->firstActivity($budget);
|
||||||
$end = new Carbon;
|
$end = new Carbon;
|
||||||
$set = $budget->limitrepetitions()->orderBy('startdate', 'DESC')->get();
|
$set = $budget->limitrepetitions()->orderBy('startdate', 'DESC')->get();
|
||||||
//$set = $repository->getBudgetLimits($budget);
|
$subTitle = e($budget->name);
|
||||||
//$subTitle = e($budget->name);
|
|
||||||
} else {
|
} else {
|
||||||
$start = $repetition->startdate;
|
$start = $repetition->startdate;
|
||||||
$end = $repetition->enddate;
|
$end = $repetition->enddate;
|
||||||
$set = new Collection([$repetition]);
|
$set = new Collection([$repetition]);
|
||||||
// $spentArray = $repository->spentPerDay($budget, $start, $end);
|
$subTitle = trans('firefly.budget_in_month', ['name' => $budget->name, 'month' => $repetition->startdate->formatLocalized($this->monthFormat)]);
|
||||||
// $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)]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$spentArray = $repository->spentPerDay($budget, $start, $end);
|
$spentArray = $repository->spentPerDay($budget, $start, $end);
|
||||||
@@ -258,13 +253,6 @@ class BudgetController extends Controller
|
|||||||
$limits->push($entry);
|
$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);
|
$journals->setPath('/budgets/show/' . $budget->id);
|
||||||
|
|
||||||
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle'));
|
return view('budgets.show', compact('limits', 'budget', 'repetition', 'journals', 'subTitle'));
|
||||||
|
@@ -203,17 +203,6 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
|||||||
->get(['limit_repetitions.*', 'budget_limits.budget_id']);
|
->get(['limit_repetitions.*', 'budget_limits.budget_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Budget $budget
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getBudgetLimits(Budget $budget)
|
|
||||||
{
|
|
||||||
return $budget->budgetLimits()->orderBy('startdate', 'DESC')->get();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array with the following key:value pairs:
|
* Returns an array with the following key:value pairs:
|
||||||
*
|
*
|
||||||
|
@@ -160,13 +160,6 @@ interface BudgetRepositoryInterface
|
|||||||
*/
|
*/
|
||||||
public function getAllBudgetLimitRepetitions(Carbon $start, Carbon $end);
|
public function getAllBudgetLimitRepetitions(Carbon $start, Carbon $end);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Budget $budget
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getBudgetLimits(Budget $budget);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user