mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
@@ -82,13 +82,16 @@ class AccountController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function expenseAccounts(): JsonResponse
|
public function expenseAccounts(): JsonResponse
|
||||||
{
|
{
|
||||||
Log::debug('RevenueAccounts');
|
Log::debug('ExpenseAccounts');
|
||||||
|
|
||||||
/** @var Carbon $start */
|
/** @var Carbon $start */
|
||||||
$start = clone session('start', today(config('app.timezone'))->startOfMonth());
|
$start = clone session('start', today(config('app.timezone'))->startOfMonth());
|
||||||
|
|
||||||
/** @var Carbon $end */
|
/** @var Carbon $end */
|
||||||
$end = clone session('end', today(config('app.timezone'))->endOfMonth());
|
$end = clone session('end', today(config('app.timezone'))->endOfMonth());
|
||||||
|
$start->startOfDay();
|
||||||
|
$end->endOfDay();
|
||||||
|
|
||||||
$cache = new CacheProperties();
|
$cache = new CacheProperties();
|
||||||
$cache->addProperty($start);
|
$cache->addProperty($start);
|
||||||
$cache->addProperty($end);
|
$cache->addProperty($end);
|
||||||
@@ -97,7 +100,6 @@ class AccountController extends Controller
|
|||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
return response()->json($cache->get());
|
return response()->json($cache->get());
|
||||||
}
|
}
|
||||||
$start->subDay();
|
|
||||||
|
|
||||||
// prep some vars:
|
// prep some vars:
|
||||||
$currencies = [];
|
$currencies = [];
|
||||||
@@ -557,6 +559,10 @@ class AccountController extends Controller
|
|||||||
|
|
||||||
/** @var Carbon $end */
|
/** @var Carbon $end */
|
||||||
$end = clone session('end', today(config('app.timezone'))->endOfMonth());
|
$end = clone session('end', today(config('app.timezone'))->endOfMonth());
|
||||||
|
|
||||||
|
$start->startOfDay();
|
||||||
|
$end->endOfDay();
|
||||||
|
|
||||||
$cache = new CacheProperties();
|
$cache = new CacheProperties();
|
||||||
$cache->addProperty($start);
|
$cache->addProperty($start);
|
||||||
$cache->addProperty($end);
|
$cache->addProperty($end);
|
||||||
@@ -565,7 +571,6 @@ class AccountController extends Controller
|
|||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
return response()->json($cache->get());
|
return response()->json($cache->get());
|
||||||
}
|
}
|
||||||
$start->subDay();
|
|
||||||
|
|
||||||
// prep some vars:
|
// prep some vars:
|
||||||
$currencies = [];
|
$currencies = [];
|
||||||
|
Reference in New Issue
Block a user