mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Fix bad sort in bill controller
This commit is contained in:
@@ -109,7 +109,7 @@ class BillController extends Controller
|
||||
$cache->addProperty('chart.bill.single');
|
||||
$cache->addProperty($bill->id);
|
||||
if ($cache->has()) {
|
||||
return response()->json($cache->get()); // @codeCoverageIgnore
|
||||
return response()->json($cache->get()); // @codeCoverageIgnore
|
||||
}
|
||||
$locale = app('steam')->getLocale();
|
||||
|
||||
@@ -121,7 +121,13 @@ class BillController extends Controller
|
||||
usort(
|
||||
$journals,
|
||||
static function (array $left, array $right) {
|
||||
return $left['date']->gte($right['date']) ? 1 : 0;
|
||||
if($left['date']->gt($right['date'])) {
|
||||
return 1;
|
||||
}
|
||||
if($left['date']->lt($right['date'])) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user