mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Add some notes
This commit is contained in:
@@ -93,6 +93,7 @@ class AccountController extends Controller
|
|||||||
$currency = $this->repository->getAccountCurrency($account) ?? $this->nativeCurrency;
|
$currency = $this->repository->getAccountCurrency($account) ?? $this->nativeCurrency;
|
||||||
$useCurrency = $currency;
|
$useCurrency = $currency;
|
||||||
if (in_array($account->accountType->type, $this->balanceTypes, true)) {
|
if (in_array($account->accountType->type, $this->balanceTypes, true)) {
|
||||||
|
// this one is correct.
|
||||||
Log::debug(sprintf('accounts: Call finalAccountBalance with date/time "%s"', $date->toIso8601String()));
|
Log::debug(sprintf('accounts: Call finalAccountBalance with date/time "%s"', $date->toIso8601String()));
|
||||||
$balance = Steam::finalAccountBalance($account, $date);
|
$balance = Steam::finalAccountBalance($account, $date);
|
||||||
$key = $this->convertToNative && $currency->id !== $this->nativeCurrency->id ? 'native_balance' : 'balance';
|
$key = $this->convertToNative && $currency->id !== $this->nativeCurrency->id ? 'native_balance' : 'balance';
|
||||||
|
@@ -136,6 +136,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
;
|
;
|
||||||
$journals = $collector->getExtractedJournals();
|
$journals = $collector->getExtractedJournals();
|
||||||
$journals = array_reverse($journals, true);
|
$journals = array_reverse($journals, true);
|
||||||
|
// this call is correct.
|
||||||
Log::debug(sprintf('getAuditReport: Call finalAccountBalance with date/time "%s"', $date->toIso8601String()));
|
Log::debug(sprintf('getAuditReport: Call finalAccountBalance with date/time "%s"', $date->toIso8601String()));
|
||||||
$dayBeforeBalance = Steam::finalAccountBalance($account, $date);
|
$dayBeforeBalance = Steam::finalAccountBalance($account, $date);
|
||||||
$startBalance = $dayBeforeBalance['balance'];
|
$startBalance = $dayBeforeBalance['balance'];
|
||||||
@@ -171,6 +172,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
$journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date');
|
$journals[$index]['invoice_date'] = $journalRepository->getMetaDateById($journal['transaction_journal_id'], 'invoice_date');
|
||||||
}
|
}
|
||||||
$locale = app('steam')->getLocale();
|
$locale = app('steam')->getLocale();
|
||||||
|
// call is correct.
|
||||||
Log::debug(sprintf('getAuditReport end: Call finalAccountBalance with date/time "%s"', $this->end->toIso8601String()));
|
Log::debug(sprintf('getAuditReport end: Call finalAccountBalance with date/time "%s"', $this->end->toIso8601String()));
|
||||||
return [
|
return [
|
||||||
'journals' => $journals,
|
'journals' => $journals,
|
||||||
|
@@ -115,6 +115,7 @@ class ReconcileController extends Controller
|
|||||||
|
|
||||||
$startDate = clone $start;
|
$startDate = clone $start;
|
||||||
$startDate->subDay()->endOfDay(); // this is correct, subday endofday ends at 23:59:59
|
$startDate->subDay()->endOfDay(); // this is correct, subday endofday ends at 23:59:59
|
||||||
|
// both are validated and are correct.
|
||||||
Log::debug(sprintf('reconcile: Call finalAccountBalance with date/time "%s"', $startDate->toIso8601String()));
|
Log::debug(sprintf('reconcile: Call finalAccountBalance with date/time "%s"', $startDate->toIso8601String()));
|
||||||
Log::debug(sprintf('reconcile2: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
Log::debug(sprintf('reconcile2: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
||||||
$startBalance = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places);
|
$startBalance = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places);
|
||||||
|
@@ -136,6 +136,7 @@ class ShowController extends Controller
|
|||||||
|
|
||||||
$groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
|
$groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
|
||||||
$showAll = false;
|
$showAll = false;
|
||||||
|
// correct
|
||||||
Log::debug(sprintf('show: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
Log::debug(sprintf('show: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
||||||
$balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $end), $account, $this->convertToNative, $accountCurrency);
|
$balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $end), $account, $this->convertToNative, $accountCurrency);
|
||||||
|
|
||||||
@@ -202,6 +203,7 @@ class ShowController extends Controller
|
|||||||
$groups->setPath(route('accounts.show.all', [$account->id]));
|
$groups->setPath(route('accounts.show.all', [$account->id]));
|
||||||
$chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
$chartUrl = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||||
$showAll = true;
|
$showAll = true;
|
||||||
|
// correct
|
||||||
Log::debug(sprintf('showAll: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
Log::debug(sprintf('showAll: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
||||||
$balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $end), $account, $this->convertToNative, $accountCurrency);
|
$balances = Steam::filterAccountBalance(Steam::finalAccountBalance($account, $end), $account, $this->convertToNative, $accountCurrency);
|
||||||
|
|
||||||
|
@@ -424,6 +424,7 @@ class AccountController extends Controller
|
|||||||
{
|
{
|
||||||
$start->startOfDay();
|
$start->startOfDay();
|
||||||
$end->endOfDay();
|
$end->endOfDay();
|
||||||
|
// TODO not sure if these date ranges will work as expected.
|
||||||
Log::debug(sprintf('Now in period("%s", "%s")', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
|
Log::debug(sprintf('Now in period("%s", "%s")', $start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));
|
||||||
$chartData = [];
|
$chartData = [];
|
||||||
$cache = new CacheProperties();
|
$cache = new CacheProperties();
|
||||||
@@ -456,6 +457,7 @@ class AccountController extends Controller
|
|||||||
// temp, get end balance.
|
// temp, get end balance.
|
||||||
Log::debug('temp get end balance');
|
Log::debug('temp get end balance');
|
||||||
Log::debug(sprintf('period: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
Log::debug(sprintf('period: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
||||||
|
// correct
|
||||||
Steam::finalAccountBalance($account, $end);
|
Steam::finalAccountBalance($account, $end);
|
||||||
Log::debug('END temp get end balance done');
|
Log::debug('END temp get end balance done');
|
||||||
|
|
||||||
|
@@ -195,6 +195,7 @@ class ReconcileController extends Controller
|
|||||||
$startDate->subDay();
|
$startDate->subDay();
|
||||||
|
|
||||||
$currency = $this->accountRepos->getAccountCurrency($account) ?? $this->defaultCurrency;
|
$currency = $this->accountRepos->getAccountCurrency($account) ?? $this->defaultCurrency;
|
||||||
|
// correct
|
||||||
Log::debug(sprintf('transactions: Call finalAccountBalance with date/time "%s"', $startDate->toIso8601String()));
|
Log::debug(sprintf('transactions: Call finalAccountBalance with date/time "%s"', $startDate->toIso8601String()));
|
||||||
Log::debug(sprintf('transactions2: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
Log::debug(sprintf('transactions2: Call finalAccountBalance with date/time "%s"', $end->toIso8601String()));
|
||||||
$startBalance = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places);
|
$startBalance = Steam::bcround(Steam::finalAccountBalance($account, $startDate)['balance'], $currency->decimal_places);
|
||||||
|
Reference in New Issue
Block a user