mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
Switched two queries around.
This commit is contained in:
@@ -34,7 +34,8 @@ class JsonController extends Controller
|
|||||||
switch (Input::get('box')) {
|
switch (Input::get('box')) {
|
||||||
case 'in':
|
case 'in':
|
||||||
$box = Input::get('box');
|
$box = Input::get('box');
|
||||||
$set = $reportQuery->journalsByExpenseAccount($start, $end, true);
|
$set = $reportQuery->incomeByPeriod($start, $end, true);
|
||||||
|
|
||||||
|
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$amount += $entry->queryAmount;
|
$amount += $entry->queryAmount;
|
||||||
@@ -42,7 +43,7 @@ class JsonController extends Controller
|
|||||||
break;
|
break;
|
||||||
case 'out':
|
case 'out':
|
||||||
$box = Input::get('box');
|
$box = Input::get('box');
|
||||||
$set = $reportQuery->incomeByPeriod($start, $end, true);
|
$set = $reportQuery->journalsByExpenseAccount($start, $end, true);
|
||||||
|
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$amount += $entry->queryAmount;
|
$amount += $entry->queryAmount;
|
||||||
|
Reference in New Issue
Block a user