James Cole 2022-09-11 07:08:02 +02:00
parent d9e8f8106a
commit 9c2f771bae
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
4 changed files with 18 additions and 15 deletions

View File

@ -438,7 +438,7 @@ class AccountController extends Controller
$cache->addProperty($end);
$cache->addProperty($account->id);
if ($cache->has()) {
//return response()->json($cache->get());
return response()->json($cache->get());
}
$currencies = $this->accountRepository->getUsedCurrencies($account);

View File

@ -99,7 +99,7 @@ class BudgetController extends Controller
$cache->addProperty($budget->id);
if ($cache->has()) {
//return response()->json($cache->get());
return response()->json($cache->get());
}
$step = $this->calculateStep($start, $end); // depending on diff, do something with range of chart.
$collection = new Collection([$budget]);

View File

@ -196,13 +196,16 @@ class ReportController extends Controller
$key = 'spent';
$amount = app('steam')->positive($journal['amount']);
// deposit = incoming
// transfer or reconcile or opening balance, and these accounts are the destination.
if (
TransactionType::DEPOSIT === $journal['transaction_type_type']
|| // deposit = incoming
// transfer or opening balance, and these accounts are the destination.
||
(
(
TransactionType::TRANSFER === $journal['transaction_type_type']
|| TransactionType::RECONCILIATION === $journal['transaction_type_type']
|| TransactionType::OPENING_BALANCE === $journal['transaction_type_type']
)
&& in_array($journal['destination_account_id'], $ids, true)

View File

@ -73,7 +73,7 @@ class BoxController extends Controller
$cache->addProperty($today);
$cache->addProperty('box-available');
if ($cache->has()) {
//return response()->json($cache->get());
return response()->json($cache->get());
}
$leftPerDayAmount = '0';
$leftToSpendAmount = '0';