Switched two queries around.

This commit is contained in:
James Cole
2015-04-09 21:30:35 +02:00
parent 2432af7883
commit 490997157e

View File

@@ -34,7 +34,8 @@ class JsonController extends Controller
switch (Input::get('box')) {
case 'in':
$box = Input::get('box');
$set = $reportQuery->journalsByExpenseAccount($start, $end, true);
$set = $reportQuery->incomeByPeriod($start, $end, true);
foreach ($set as $entry) {
$amount += $entry->queryAmount;
@@ -42,7 +43,7 @@ class JsonController extends Controller
break;
case 'out':
$box = Input::get('box');
$set = $reportQuery->incomeByPeriod($start, $end, true);
$set = $reportQuery->journalsByExpenseAccount($start, $end, true);
foreach ($set as $entry) {
$amount += $entry->queryAmount;