Some cleaning up

This commit is contained in:
James Cole
2015-05-17 09:18:44 +02:00
parent 6ca119c4db
commit e6263f9ff5
20 changed files with 58 additions and 111 deletions

View File

@@ -38,7 +38,7 @@ class JsonController extends Controller
$end = Session::get('end', Carbon::now()->endOfMonth());
$amount = 0;
// these two functions are the same as the chart TODO
// these two functions are the same as the chart
$bills = $repository->getActiveBills();
/** @var Bill $bill */
@@ -141,7 +141,7 @@ class JsonController extends Controller
{
$start = Session::get('start', Carbon::now()->startOfMonth());
$end = Session::get('end', Carbon::now()->endOfMonth());
$amount = $reportQuery->journalsByExpenseAccount($start, $end, true)->sum('queryAmount');
$amount = $reportQuery->expenseInPeriod($start, $end, true)->sum('queryAmount') * -1;
return Response::json(['box' => 'out', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount]);
}