mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 10:33:30 +00:00
Code cleanup.
This commit is contained in:
@@ -161,15 +161,6 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// $data = $data->filter(
|
|
||||||
// function (TransactionJournal $journal) {
|
|
||||||
// if ($journal->amount != 0) {
|
|
||||||
// return $journal;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@@ -329,7 +329,7 @@ class CategoryController extends Controller
|
|||||||
$categories = $categories->merge($set);
|
$categories = $categories->merge($set);
|
||||||
// save the set combined with the data that is in it:
|
// save the set combined with the data that is in it:
|
||||||
// for example:
|
// for example:
|
||||||
// [december 2015, salary:1000, bonus:200]
|
// december 2015, salary:1000, bonus:200
|
||||||
$sets->push([$currentStart, $set]);
|
$sets->push([$currentStart, $set]);
|
||||||
$start->addMonth();
|
$start->addMonth();
|
||||||
}
|
}
|
||||||
|
@@ -215,7 +215,6 @@ class ReportController extends Controller
|
|||||||
|
|
||||||
// more than one year date difference means year report.
|
// more than one year date difference means year report.
|
||||||
if ($start->diffInMonths($end) > 12) {
|
if ($start->diffInMonths($end) > 12) {
|
||||||
// return view('error')->with('message', 'No report yet for this time period.');
|
|
||||||
return $this->defaultMultiYear($report_type, $start, $end, $accounts);
|
return $this->defaultMultiYear($report_type, $start, $end, $accounts);
|
||||||
}
|
}
|
||||||
// more than two months date difference means year report.
|
// more than two months date difference means year report.
|
||||||
@@ -224,7 +223,6 @@ class ReportController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->defaultMonth($report_type, $start, $end, $accounts);
|
return $this->defaultMonth($report_type, $start, $end, $accounts);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ Route::bind(
|
|||||||
throw new NotFoundHttpException;
|
throw new NotFoundHttpException;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// account list! Yay!
|
// accounts
|
||||||
Route::bind(
|
Route::bind(
|
||||||
'accountList',
|
'accountList',
|
||||||
function ($value) {
|
function ($value) {
|
||||||
|
@@ -76,7 +76,7 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
$set = $set->filter(
|
$set = $set->filter(
|
||||||
function (Bill $bill) use ($ids) {
|
function (Bill $bill) use ($ids) {
|
||||||
// get transaction journals from or to any of the mentioned accounts.
|
// get transaction journals from or to any of the mentioned accounts.
|
||||||
// if zero, return null.
|
// when zero, return null.
|
||||||
$journals = $bill->transactionjournals()->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
$journals = $bill->transactionjournals()->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||||
->whereIn('transactions.account_id', $ids)->count();
|
->whereIn('transactions.account_id', $ids)->count();
|
||||||
|
|
||||||
|
@@ -190,8 +190,6 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
|
|||||||
->where('limit_repetitions.startdate', $start->format('Y-m-d 00:00:00'))
|
->where('limit_repetitions.startdate', $start->format('Y-m-d 00:00:00'))
|
||||||
->where('limit_repetitions.enddate', $end->format('Y-m-d 00:00:00'))
|
->where('limit_repetitions.enddate', $end->format('Y-m-d 00:00:00'))
|
||||||
->first(['limit_repetitions.*']);
|
->first(['limit_repetitions.*']);
|
||||||
//Log::debug('Looking for limit reps for budget #' . $budget->id . ' start [' . $start . '] and end [' . $end . '].');
|
|
||||||
//Log::debug(DB::getQueryLog())
|
|
||||||
$cache->store($data);
|
$cache->store($data);
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Reference in New Issue
Block a user