Some code cleanup.

This commit is contained in:
James Cole
2016-11-26 09:01:00 +01:00
parent 1453a78e49
commit 8c9f90f1b4
6 changed files with 15 additions and 17 deletions

View File

@@ -220,9 +220,8 @@ class AccountController extends Controller
}
/**
* @param AccountTaskerInterface $tasker
* @param ARI $repository
* @param Account $account
* @param JournalCollectorInterface $collector
* @param Account $account
*
* @return View
*/

View File

@@ -204,7 +204,7 @@ class BudgetController extends Controller
$cache->addProperty('budget');
$cache->addProperty('period');
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
// the expenses:

View File

@@ -292,10 +292,9 @@ class CategoryReportController extends Controller
$currentEnd = clone $currentStart;
Log::debug(sprintf('Function is %s', $function));
$currentEnd = $currentEnd->$function();
//$currentEnd = Navigation::endOfPeriod($current, $period);
$expenses = $this->groupByCategory($this->getExpenses($accounts, $categories, $currentStart, $currentEnd));
$income = $this->groupByCategory($this->getIncome($accounts, $categories, $currentStart, $currentEnd));
$label = $currentStart->formatLocalized(strval(trans('config.' . $format)));
$expenses = $this->groupByCategory($this->getExpenses($accounts, $categories, $currentStart, $currentEnd));
$income = $this->groupByCategory($this->getIncome($accounts, $categories, $currentStart, $currentEnd));
$label = $currentStart->formatLocalized(strval(trans('config.' . $format)));
Log::debug(sprintf('Now grabbing CMC expenses between %s and %s', $currentStart->format('Y-m-d'), $currentEnd->format('Y-m-d')));
@@ -314,7 +313,7 @@ class CategoryReportController extends Controller
}
$currentStart = clone $currentEnd;
$currentStart->addDay();// = Navigation::addPeriod($current, $period, 0);
$currentStart->addDay();
}
$data = $this->generator->mainReportChart($data);

View File

@@ -168,7 +168,6 @@ class ConvertController extends Controller
$sourceAccount = TransactionJournal::sourceAccountList($journal)->first();
$destinationAccount = TransactionJournal::destinationAccountList($journal)->first();
$sourceType = $journal->transactionType;
$destination = null;
$joined = $sourceType->type . '-' . $destinationType->type;
switch ($joined) {
default: