mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-25 06:51:08 +00:00
Replace deprecated method.
This commit is contained in:
@@ -255,9 +255,9 @@ class MonthReportGenerator implements ReportGeneratorInterface
|
|||||||
'journals' => $journals,
|
'journals' => $journals,
|
||||||
'currency' => $currency,
|
'currency' => $currency,
|
||||||
'exists' => !empty($journals),
|
'exists' => !empty($journals),
|
||||||
'end' => $this->end->formatLocalized((string)trans('config.month_and_day', [], $locale)),
|
'end' => $this->end->isoFormat((string)trans('config.month_and_day_moment_js', [], $locale)),
|
||||||
'endBalance' => app('steam')->balance($account, $this->end),
|
'endBalance' => app('steam')->balance($account, $this->end),
|
||||||
'dayBefore' => $date->formatLocalized((string)trans('config.month_and_day', [], $locale)),
|
'dayBefore' => $date->isoFormat((string)trans('config.month_and_day_moment_js', [], $locale)),
|
||||||
'dayBeforeBalance' => $dayBeforeBalance,
|
'dayBeforeBalance' => $dayBeforeBalance,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@@ -141,7 +141,7 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
$currentEnd = clone $start;
|
$currentEnd = clone $start;
|
||||||
$currentEnd->endOfMonth();
|
$currentEnd->endOfMonth();
|
||||||
$months[$year]['months'][] = [
|
$months[$year]['months'][] = [
|
||||||
'formatted' => $start->formatLocalized('%B %Y'),
|
'formatted' => $start->isoFormat((string)trans('config.month_js')),
|
||||||
'start' => $start->format('Y-m-d'),
|
'start' => $start->format('Y-m-d'),
|
||||||
'end' => $currentEnd->format('Y-m-d'),
|
'end' => $currentEnd->format('Y-m-d'),
|
||||||
'month' => $start->month,
|
'month' => $start->month,
|
||||||
|
@@ -237,7 +237,8 @@ class ReconcileController extends Controller
|
|||||||
// title:
|
// title:
|
||||||
$description = trans(
|
$description = trans(
|
||||||
'firefly.reconciliation_transaction_title',
|
'firefly.reconciliation_transaction_title',
|
||||||
['from' => $start->formatLocalized($this->monthAndDayFormat), 'to' => $end->formatLocalized($this->monthAndDayFormat)]
|
['from' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
|
'to' => $end->isoFormat($this->monthAndDayFormat)]
|
||||||
);
|
);
|
||||||
$submission = [
|
$submission = [
|
||||||
'user' => auth()->user()->id,
|
'user' => auth()->user()->id,
|
||||||
|
@@ -109,8 +109,8 @@ class ShowController extends Controller
|
|||||||
$page = (int)$request->get('page');
|
$page = (int)$request->get('page');
|
||||||
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
||||||
$currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
$currency = $this->repository->getAccountCurrency($account) ?? app('amount')->getDefaultCurrency();
|
||||||
$fStart = $start->formatLocalized($this->monthAndDayFormat);
|
$fStart = $start->isoFormat($this->monthAndDayFormat);
|
||||||
$fEnd = $end->formatLocalized($this->monthAndDayFormat);
|
$fEnd = $end->isoFormat($this->monthAndDayFormat);
|
||||||
$subTitle = (string)trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]);
|
$subTitle = (string)trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]);
|
||||||
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||||
$firstTransaction = $this->repository->oldestJournalDate($account) ?? $start;
|
$firstTransaction = $this->repository->oldestJournalDate($account) ?? $start;
|
||||||
|
@@ -208,8 +208,8 @@ class IndexController extends Controller
|
|||||||
$array['budgeted'][] = [
|
$array['budgeted'][] = [
|
||||||
'id' => $limit->id,
|
'id' => $limit->id,
|
||||||
'amount' => number_format((float)$limit->amount, $currency->decimal_places, '.', ''),
|
'amount' => number_format((float)$limit->amount, $currency->decimal_places, '.', ''),
|
||||||
'start_date' => $limit->start_date->formatLocalized($this->monthAndDayFormat),
|
'start_date' => $limit->start_date->isoFormat($this->monthAndDayFormat),
|
||||||
'end_date' => $limit->end_date->formatLocalized($this->monthAndDayFormat),
|
'end_date' => $limit->end_date->isoFormat($this->monthAndDayFormat),
|
||||||
'in_range' => $limit->start_date->isSameDay($start) && $limit->end_date->isSameDay($end),
|
'in_range' => $limit->start_date->isSameDay($start) && $limit->end_date->isSameDay($end),
|
||||||
'currency_id' => $currency->id,
|
'currency_id' => $currency->id,
|
||||||
'currency_symbol' => $currency->symbol,
|
'currency_symbol' => $currency->symbol,
|
||||||
|
@@ -88,7 +88,7 @@ class ShowController extends Controller
|
|||||||
$end = $end ?? session('end');
|
$end = $end ?? session('end');
|
||||||
$subTitle = trans(
|
$subTitle = trans(
|
||||||
'firefly.without_budget_between',
|
'firefly.without_budget_between',
|
||||||
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
['start' => $start->isoFormat($this->monthAndDayFormat), 'end' => $end->isoFormat($this->monthAndDayFormat)]
|
||||||
);
|
);
|
||||||
|
|
||||||
// get first journal ever to set off the budget period overview.
|
// get first journal ever to set off the budget period overview.
|
||||||
@@ -192,8 +192,8 @@ class ShowController extends Controller
|
|||||||
'firefly.budget_in_period',
|
'firefly.budget_in_period',
|
||||||
[
|
[
|
||||||
'name' => $budget->name,
|
'name' => $budget->name,
|
||||||
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
|
'start' => $budgetLimit->start_date->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
|
'end' => $budgetLimit->end_date->isoFormat($this->monthAndDayFormat),
|
||||||
'currency' => $budgetLimit->transactionCurrency->name,
|
'currency' => $budgetLimit->transactionCurrency->name,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@@ -88,7 +88,7 @@ class NoCategoryController extends Controller
|
|||||||
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
$pageSize = (int)app('preferences')->get('listPageSize', 50)->data;
|
||||||
$subTitle = trans(
|
$subTitle = trans(
|
||||||
'firefly.without_category_between',
|
'firefly.without_category_between',
|
||||||
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
['start' => $start->isoFormat($this->monthAndDayFormat), 'end' => $end->isoFormat($this->monthAndDayFormat)]
|
||||||
);
|
);
|
||||||
$periods = $this->getNoCategoryPeriodOverview($start);
|
$periods = $this->getNoCategoryPeriodOverview($start);
|
||||||
|
|
||||||
|
@@ -94,8 +94,8 @@ class ShowController extends Controller
|
|||||||
$path = route('categories.show', [$category->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
$path = route('categories.show', [$category->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||||
$subTitle = trans(
|
$subTitle = trans(
|
||||||
'firefly.journals_in_period_for_category',
|
'firefly.journals_in_period_for_category',
|
||||||
['name' => $category->name, 'start' => $start->formatLocalized($this->monthAndDayFormat),
|
['name' => $category->name, 'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),]
|
'end' => $end->isoFormat($this->monthAndDayFormat),]
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @var GroupCollectorInterface $collector */
|
/** @var GroupCollectorInterface $collector */
|
||||||
|
@@ -493,7 +493,7 @@ class AccountController extends Controller
|
|||||||
while ($end >= $current) {
|
while ($end >= $current) {
|
||||||
$theDate = $current->format('Y-m-d');
|
$theDate = $current->format('Y-m-d');
|
||||||
$balance = $range[$theDate] ?? $previous;
|
$balance = $range[$theDate] ?? $previous;
|
||||||
$label = $current->formatLocalized($format);
|
$label = $current->isoFormat($format);
|
||||||
$entries[$label] = (float)$balance;
|
$entries[$label] = (float)$balance;
|
||||||
$previous = $balance;
|
$previous = $balance;
|
||||||
$current->addDay();
|
$current->addDay();
|
||||||
|
@@ -145,7 +145,7 @@ class BillController extends Controller
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($journals as $journal) {
|
foreach ($journals as $journal) {
|
||||||
$date = $journal['date']->formatLocalized((string)trans('config.month_and_day', [], $locale));
|
$date = $journal['date']->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||||
$chartData[0]['entries'][$date] = $bill->amount_min; // minimum amount of bill
|
$chartData[0]['entries'][$date] = $bill->amount_min; // minimum amount of bill
|
||||||
$chartData[1]['entries'][$date] = $bill->amount_max; // maximum amount of bill
|
$chartData[1]['entries'][$date] = $bill->amount_max; // maximum amount of bill
|
||||||
|
|
||||||
|
@@ -184,7 +184,7 @@ class BudgetController extends Controller
|
|||||||
$expenses = $this->opsRepository->sumExpenses($current, $current, null, $budgetCollection, $currency);
|
$expenses = $this->opsRepository->sumExpenses($current, $current, null, $budgetCollection, $currency);
|
||||||
$spent = $expenses[(int)$currency->id]['sum'] ?? '0';
|
$spent = $expenses[(int)$currency->id]['sum'] ?? '0';
|
||||||
$amount = bcadd($amount, $spent);
|
$amount = bcadd($amount, $spent);
|
||||||
$format = $start->formatLocalized((string)trans('config.month_and_day', [], $locale));
|
$format = $start->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||||
$entries[$format] = $amount;
|
$entries[$format] = $amount;
|
||||||
|
|
||||||
$start->addDay();
|
$start->addDay();
|
||||||
@@ -478,7 +478,7 @@ class BudgetController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentStart = app('navigation')->startOfPeriod($currentStart, $preferredRange);
|
$currentStart = app('navigation')->startOfPeriod($currentStart, $preferredRange);
|
||||||
$title = $currentStart->formatLocalized($titleFormat);
|
$title = $currentStart->isoFormat($titleFormat);
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
|
|
||||||
// default limit is no limit:
|
// default limit is no limit:
|
||||||
@@ -539,7 +539,7 @@ class BudgetController extends Controller
|
|||||||
$preferredRange = app('navigation')->preferredRangeFormat($start, $end);
|
$preferredRange = app('navigation')->preferredRangeFormat($start, $end);
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
$title = $currentStart->formatLocalized($titleFormat);
|
$title = $currentStart->isoFormat($titleFormat);
|
||||||
$sum = $this->nbRepository->sumExpenses($currentStart, $currentEnd, $accounts, $currency);
|
$sum = $this->nbRepository->sumExpenses($currentStart, $currentEnd, $accounts, $currency);
|
||||||
$amount = app('steam')->positive($sum[$currency->id]['sum'] ?? '0');
|
$amount = app('steam')->positive($sum[$currency->id]['sum'] ?? '0');
|
||||||
$chartData[$title] = round((float)$amount, $currency->decimal_places);
|
$chartData[$title] = round((float)$amount, $currency->decimal_places);
|
||||||
|
@@ -212,7 +212,7 @@ class BudgetReportController extends Controller
|
|||||||
|
|
||||||
foreach ($currency['budgets'] as $currentBudget) {
|
foreach ($currency['budgets'] as $currentBudget) {
|
||||||
foreach ($currentBudget['transaction_journals'] as $journal) {
|
foreach ($currentBudget['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -239,7 +239,7 @@ class BudgetReportController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
$key = $currentStart->formatLocalized($format);
|
$key = $currentStart->isoFormat($format);
|
||||||
$return[$key] = '0';
|
$return[$key] = '0';
|
||||||
$currentStart = clone $currentEnd;
|
$currentStart = clone $currentEnd;
|
||||||
$currentStart->addDay()->startOfDay();
|
$currentStart->addDay()->startOfDay();
|
||||||
|
@@ -240,7 +240,7 @@ class CategoryController extends Controller
|
|||||||
$outSet = $expenses[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
|
$outSet = $expenses[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
|
||||||
foreach ($outSet['transaction_journals'] as $journal) {
|
foreach ($outSet['transaction_journals'] as $journal) {
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$date = $journal['date']->formatLocalized($format);
|
$date = $journal['date']->isoFormat($format);
|
||||||
$chartData[$outKey]['entries'][$date] = $chartData[$outKey]['entries'][$date] ?? '0';
|
$chartData[$outKey]['entries'][$date] = $chartData[$outKey]['entries'][$date] ?? '0';
|
||||||
|
|
||||||
$chartData[$outKey]['entries'][$date] = bcadd($amount, $chartData[$outKey]['entries'][$date]);
|
$chartData[$outKey]['entries'][$date] = bcadd($amount, $chartData[$outKey]['entries'][$date]);
|
||||||
@@ -249,7 +249,7 @@ class CategoryController extends Controller
|
|||||||
$inSet = $income[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
|
$inSet = $income[$currencyId]['categories'][$categoryId] ?? ['transaction_journals' => []];
|
||||||
foreach ($inSet['transaction_journals'] as $journal) {
|
foreach ($inSet['transaction_journals'] as $journal) {
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$date = $journal['date']->formatLocalized($format);
|
$date = $journal['date']->isoFormat($format);
|
||||||
$chartData[$inKey]['entries'][$date] = $chartData[$inKey]['entries'][$date] ?? '0';
|
$chartData[$inKey]['entries'][$date] = $chartData[$inKey]['entries'][$date] ?? '0';
|
||||||
$chartData[$inKey]['entries'][$date] = bcadd($amount, $chartData[$inKey]['entries'][$date]);
|
$chartData[$inKey]['entries'][$date] = bcadd($amount, $chartData[$inKey]['entries'][$date]);
|
||||||
}
|
}
|
||||||
|
@@ -277,7 +277,7 @@ class CategoryReportController extends Controller
|
|||||||
|
|
||||||
foreach ($currency['categories'] as $currentCategory) {
|
foreach ($currency['categories'] as $currentCategory) {
|
||||||
foreach ($currentCategory['transaction_journals'] as $journal) {
|
foreach ($currentCategory['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -304,7 +304,7 @@ class CategoryReportController extends Controller
|
|||||||
|
|
||||||
foreach ($currency['categories'] as $currentCategory) {
|
foreach ($currency['categories'] as $currentCategory) {
|
||||||
foreach ($currentCategory['transaction_journals'] as $journal) {
|
foreach ($currentCategory['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -333,7 +333,7 @@ class CategoryReportController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
$key = $currentStart->formatLocalized($format);
|
$key = $currentStart->isoFormat($format);
|
||||||
$return[$key] = '0';
|
$return[$key] = '0';
|
||||||
$currentStart = clone $currentEnd;
|
$currentStart = clone $currentEnd;
|
||||||
$currentStart->addDay()->startOfDay();
|
$currentStart->addDay()->startOfDay();
|
||||||
|
@@ -210,7 +210,7 @@ class DoubleReportController extends Controller
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($currency['transaction_journals'] as $journal) {
|
foreach ($currency['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -236,7 +236,7 @@ class DoubleReportController extends Controller
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($currency['transaction_journals'] as $journal) {
|
foreach ($currency['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$earnedKey]['entries'][$key] = $chartData[$earnedKey]['entries'][$key] ?? '0';
|
$chartData[$earnedKey]['entries'][$key] = $chartData[$earnedKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], $amount);
|
$chartData[$earnedKey]['entries'][$key] = bcadd($chartData[$earnedKey]['entries'][$key], $amount);
|
||||||
@@ -289,7 +289,7 @@ class DoubleReportController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
$key = $currentStart->formatLocalized($format);
|
$key = $currentStart->isoFormat($format);
|
||||||
$return[$key] = '0';
|
$return[$key] = '0';
|
||||||
$currentStart = clone $currentEnd;
|
$currentStart = clone $currentEnd;
|
||||||
$currentStart->addDay()->startOfDay();
|
$currentStart->addDay()->startOfDay();
|
||||||
|
@@ -151,7 +151,7 @@ class ExpenseReportController extends Controller
|
|||||||
// get expenses grouped by opposing name:
|
// get expenses grouped by opposing name:
|
||||||
$expenses = $this->groupByName($this->getExpensesForOpposing($accounts, $all, $currentStart, $currentEnd));
|
$expenses = $this->groupByName($this->getExpensesForOpposing($accounts, $all, $currentStart, $currentEnd));
|
||||||
$income = $this->groupByName($this->getIncomeForOpposing($accounts, $all, $currentStart, $currentEnd));
|
$income = $this->groupByName($this->getIncomeForOpposing($accounts, $all, $currentStart, $currentEnd));
|
||||||
$label = $currentStart->formatLocalized($format);
|
$label = $currentStart->isoFormat($format);
|
||||||
|
|
||||||
foreach ($combined as $name => $combination) {
|
foreach ($combined as $name => $combination) {
|
||||||
// first is always expense account:
|
// first is always expense account:
|
||||||
|
@@ -100,7 +100,7 @@ class PiggyBankController extends Controller
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
$currentSum = $filtered->sum('amount');
|
$currentSum = $filtered->sum('amount');
|
||||||
$label = $oldest->formatLocalized((string)trans('config.month_and_day', [], $locale));
|
$label = $oldest->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||||
$chartData[$label] = $currentSum;
|
$chartData[$label] = $currentSum;
|
||||||
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
$oldest = app('navigation')->addPeriod($oldest, $step, 0);
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ class PiggyBankController extends Controller
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
$finalSum = $finalFiltered->sum('amount');
|
$finalSum = $finalFiltered->sum('amount');
|
||||||
$finalLabel = $today->formatLocalized((string)trans('config.month_and_day', [], $locale));
|
$finalLabel = $today->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||||
$chartData[$finalLabel] = $finalSum;
|
$chartData[$finalLabel] = $finalSum;
|
||||||
|
|
||||||
$data = $this->generator->singleSet($piggyBank->name, $chartData);
|
$data = $this->generator->singleSet($piggyBank->name, $chartData);
|
||||||
|
@@ -114,7 +114,7 @@ class ReportController extends Controller
|
|||||||
/** @var array $netWorthItem */
|
/** @var array $netWorthItem */
|
||||||
foreach ($result as $netWorthItem) {
|
foreach ($result as $netWorthItem) {
|
||||||
$currencyId = $netWorthItem['currency']->id;
|
$currencyId = $netWorthItem['currency']->id;
|
||||||
$label = $current->formatLocalized((string)trans('config.month_and_day', [], $locale));
|
$label = $current->isoFormat((string)trans('config.month_and_day_js', [], $locale));
|
||||||
if (!array_key_exists($currencyId, $chartData)) {
|
if (!array_key_exists($currencyId, $chartData)) {
|
||||||
$chartData[$currencyId] = [
|
$chartData[$currencyId] = [
|
||||||
'label' => 'Net worth in ' . $netWorthItem['currency']->name,
|
'label' => 'Net worth in ' . $netWorthItem['currency']->name,
|
||||||
@@ -239,7 +239,7 @@ class ReportController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$key = $currentStart->format($format);
|
$key = $currentStart->format($format);
|
||||||
$title = $currentStart->formatLocalized($titleFormat);
|
$title = $currentStart->isoFormat($titleFormat);
|
||||||
$income['entries'][$title] = round((float)($currency[$key]['earned'] ?? '0'), $currency['currency_decimal_places']);
|
$income['entries'][$title] = round((float)($currency[$key]['earned'] ?? '0'), $currency['currency_decimal_places']);
|
||||||
$expense['entries'][$title] = round((float)($currency[$key]['spent'] ?? '0'), $currency['currency_decimal_places']);
|
$expense['entries'][$title] = round((float)($currency[$key]['spent'] ?? '0'), $currency['currency_decimal_places']);
|
||||||
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);
|
$currentStart = app('navigation')->addPeriod($currentStart, $preferredRange, 0);
|
||||||
|
@@ -282,7 +282,7 @@ class TagReportController extends Controller
|
|||||||
|
|
||||||
foreach ($currency['tags'] as $currentTag) {
|
foreach ($currency['tags'] as $currentTag) {
|
||||||
foreach ($currentTag['transaction_journals'] as $journal) {
|
foreach ($currentTag['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -309,7 +309,7 @@ class TagReportController extends Controller
|
|||||||
|
|
||||||
foreach ($currency['tags'] as $currentTag) {
|
foreach ($currency['tags'] as $currentTag) {
|
||||||
foreach ($currentTag['transaction_journals'] as $journal) {
|
foreach ($currentTag['transaction_journals'] as $journal) {
|
||||||
$key = $journal['date']->formatLocalized($format);
|
$key = $journal['date']->isoFormat($format);
|
||||||
$amount = app('steam')->positive($journal['amount']);
|
$amount = app('steam')->positive($journal['amount']);
|
||||||
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
$chartData[$spentKey]['entries'][$key] = $chartData[$spentKey]['entries'][$key] ?? '0';
|
||||||
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
$chartData[$spentKey]['entries'][$key] = bcadd($chartData[$spentKey]['entries'][$key], $amount);
|
||||||
@@ -338,7 +338,7 @@ class TagReportController extends Controller
|
|||||||
$currentStart = clone $start;
|
$currentStart = clone $start;
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
$currentEnd = app('navigation')->endOfPeriod($currentStart, $preferredRange);
|
||||||
$key = $currentStart->formatLocalized($format);
|
$key = $currentStart->isoFormat($format);
|
||||||
$return[$key] = '0';
|
$return[$key] = '0';
|
||||||
$currentStart = clone $currentEnd;
|
$currentStart = clone $currentEnd;
|
||||||
$currentStart->addDay()->startOfDay();
|
$currentStart->addDay()->startOfDay();
|
||||||
|
@@ -92,9 +92,9 @@ abstract class Controller extends BaseController
|
|||||||
function ($request, $next): mixed {
|
function ($request, $next): mixed {
|
||||||
$locale = app('steam')->getLocale();
|
$locale = app('steam')->getLocale();
|
||||||
// translations for specific strings:
|
// translations for specific strings:
|
||||||
$this->monthFormat = (string)trans('config.month', [], $locale);
|
$this->monthFormat = (string)trans('config.month_js', [], $locale);
|
||||||
$this->monthAndDayFormat = (string)trans('config.month_and_day', [], $locale);
|
$this->monthAndDayFormat = (string)trans('config.month_and_day_moment_js', [], $locale);
|
||||||
$this->dateTimeFormat = (string)trans('config.date_time', [], $locale);
|
$this->dateTimeFormat = (string)trans('config.date_time_js', [], $locale);
|
||||||
|
|
||||||
// get shown-intro-preference:
|
// get shown-intro-preference:
|
||||||
if (auth()->check()) {
|
if (auth()->check()) {
|
||||||
|
@@ -50,7 +50,10 @@ class FrontpageController extends Controller
|
|||||||
$amount = $repository->getCurrentAmount($piggyBank);
|
$amount = $repository->getCurrentAmount($piggyBank);
|
||||||
if (1 === bccomp($amount, '0')) {
|
if (1 === bccomp($amount, '0')) {
|
||||||
// percentage!
|
// percentage!
|
||||||
$pct = round(($amount / $piggyBank->targetamount) * 100);
|
$pct = 0;
|
||||||
|
if(0.0 !== (float)$piggyBank->targetamount) {
|
||||||
|
$pct = round(($amount / $piggyBank->targetamount) * 100);
|
||||||
|
}
|
||||||
|
|
||||||
$entry = [
|
$entry = [
|
||||||
'id' => $piggyBank->id,
|
'id' => $piggyBank->id,
|
||||||
|
@@ -163,7 +163,7 @@ class RecurrenceController extends Controller
|
|||||||
$dayOfWeek = (string)trans(sprintf('config.dow_%s', $date->dayOfWeekIso));
|
$dayOfWeek = (string)trans(sprintf('config.dow_%s', $date->dayOfWeekIso));
|
||||||
$ndom = sprintf('ndom,%s,%s', $date->weekOfMonth, $date->dayOfWeekIso);
|
$ndom = sprintf('ndom,%s,%s', $date->weekOfMonth, $date->dayOfWeekIso);
|
||||||
$yearly = sprintf('yearly,%s', $date->format('Y-m-d'));
|
$yearly = sprintf('yearly,%s', $date->format('Y-m-d'));
|
||||||
$yearlyDate = $date->formatLocalized((string)trans('config.month_and_day_no_year', [], $locale));
|
$yearlyDate = $date->isoFormat((string)trans('config.month_and_day_no_year_js', [], $locale));
|
||||||
$result = [
|
$result = [
|
||||||
'daily' => ['label' => (string)trans('firefly.recurring_daily'), 'selected' => str_starts_with($preSelected, 'daily')],
|
'daily' => ['label' => (string)trans('firefly.recurring_daily'), 'selected' => str_starts_with($preSelected, 'daily')],
|
||||||
$weekly => ['label' => (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]),
|
$weekly => ['label' => (string)trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]),
|
||||||
|
@@ -385,7 +385,7 @@ class BudgetController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'destination_account_name' => $journal['destination_account_name'],
|
'destination_account_name' => $journal['destination_account_name'],
|
||||||
'destination_account_id' => $journal['destination_account_id'],
|
'destination_account_id' => $journal['destination_account_id'],
|
||||||
|
@@ -702,7 +702,7 @@ class CategoryController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'destination_account_name' => $journal['destination_account_name'],
|
'destination_account_name' => $journal['destination_account_name'],
|
||||||
'destination_account_id' => $journal['destination_account_id'],
|
'destination_account_id' => $journal['destination_account_id'],
|
||||||
@@ -752,7 +752,7 @@ class CategoryController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'source_account_name' => $journal['source_account_name'],
|
'source_account_name' => $journal['source_account_name'],
|
||||||
'source_account_id' => $journal['source_account_id'],
|
'source_account_id' => $journal['source_account_id'],
|
||||||
|
@@ -437,7 +437,7 @@ class DoubleController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'destination_account_name' => $journal['destination_account_name'],
|
'destination_account_name' => $journal['destination_account_name'],
|
||||||
'destination_account_id' => $journal['destination_account_id'],
|
'destination_account_id' => $journal['destination_account_id'],
|
||||||
@@ -487,7 +487,7 @@ class DoubleController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'destination_account_name' => $journal['destination_account_name'],
|
'destination_account_name' => $journal['destination_account_name'],
|
||||||
'destination_account_id' => $journal['destination_account_id'],
|
'destination_account_id' => $journal['destination_account_id'],
|
||||||
|
@@ -494,7 +494,7 @@ class TagController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'destination_account_name' => $journal['destination_account_name'],
|
'destination_account_name' => $journal['destination_account_name'],
|
||||||
'destination_account_id' => $journal['destination_account_id'],
|
'destination_account_id' => $journal['destination_account_id'],
|
||||||
@@ -544,7 +544,7 @@ class TagController extends Controller
|
|||||||
'transaction_group_id' => $journal['transaction_group_id'],
|
'transaction_group_id' => $journal['transaction_group_id'],
|
||||||
'amount_float' => (float)$journal['amount'],
|
'amount_float' => (float)$journal['amount'],
|
||||||
'amount' => $journal['amount'],
|
'amount' => $journal['amount'],
|
||||||
'date' => $journal['date']->formatLocalized($this->monthAndDayFormat),
|
'date' => $journal['date']->isoFormat($this->monthAndDayFormat),
|
||||||
'date_sort' => $journal['date']->format('Y-m-d'),
|
'date_sort' => $journal['date']->format('Y-m-d'),
|
||||||
'source_account_name' => $journal['source_account_name'],
|
'source_account_name' => $journal['source_account_name'],
|
||||||
'source_account_id' => $journal['source_account_id'],
|
'source_account_id' => $journal['source_account_id'],
|
||||||
|
@@ -98,8 +98,8 @@ class ReportController extends Controller
|
|||||||
trans(
|
trans(
|
||||||
'firefly.report_audit',
|
'firefly.report_audit',
|
||||||
[
|
[
|
||||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),
|
'end' => $end->isoFormat($this->monthAndDayFormat),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -134,8 +134,8 @@ class ReportController extends Controller
|
|||||||
trans(
|
trans(
|
||||||
'firefly.report_budget',
|
'firefly.report_budget',
|
||||||
[
|
[
|
||||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),
|
'end' => $end->isoFormat($this->monthAndDayFormat),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -171,8 +171,8 @@ class ReportController extends Controller
|
|||||||
trans(
|
trans(
|
||||||
'firefly.report_category',
|
'firefly.report_category',
|
||||||
[
|
[
|
||||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),
|
'end' => $end->isoFormat($this->monthAndDayFormat),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -208,8 +208,8 @@ class ReportController extends Controller
|
|||||||
trans(
|
trans(
|
||||||
'firefly.report_default',
|
'firefly.report_default',
|
||||||
[
|
[
|
||||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),
|
'end' => $end->isoFormat($this->monthAndDayFormat),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -243,7 +243,8 @@ class ReportController extends Controller
|
|||||||
'subTitle',
|
'subTitle',
|
||||||
trans(
|
trans(
|
||||||
'firefly.report_double',
|
'firefly.report_double',
|
||||||
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
['start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
|
'end' => $end->isoFormat($this->monthAndDayFormat)]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -409,8 +410,8 @@ class ReportController extends Controller
|
|||||||
trans(
|
trans(
|
||||||
'firefly.report_tag',
|
'firefly.report_tag',
|
||||||
[
|
[
|
||||||
'start' => $start->formatLocalized($this->monthAndDayFormat),
|
'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),
|
'end' => $end->isoFormat($this->monthAndDayFormat),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@@ -243,8 +243,8 @@ class TagController extends Controller
|
|||||||
$attachments = $this->repository->getAttachments($tag);
|
$attachments = $this->repository->getAttachments($tag);
|
||||||
$subTitle = trans(
|
$subTitle = trans(
|
||||||
'firefly.journals_in_period_for_tag',
|
'firefly.journals_in_period_for_tag',
|
||||||
['tag' => $tag->tag, 'start' => $start->formatLocalized($this->monthAndDayFormat),
|
['tag' => $tag->tag, 'start' => $start->isoFormat($this->monthAndDayFormat),
|
||||||
'end' => $end->formatLocalized($this->monthAndDayFormat),]
|
'end' => $end->isoFormat($this->monthAndDayFormat),]
|
||||||
);
|
);
|
||||||
|
|
||||||
$startPeriod = $this->repository->firstUseDate($tag);
|
$startPeriod = $this->repository->firstUseDate($tag);
|
||||||
|
@@ -97,8 +97,8 @@ class IndexController extends Controller
|
|||||||
|
|
||||||
[$start, $end] = $end < $start ? [$end, $start] : [$start, $end];
|
[$start, $end] = $end < $start ? [$end, $start] : [$start, $end];
|
||||||
$path = route('transactions.index', [$objectType, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
$path = route('transactions.index', [$objectType, $start->format('Y-m-d'), $end->format('Y-m-d')]);
|
||||||
$startStr = $start->formatLocalized($this->monthAndDayFormat);
|
$startStr = $start->isoFormat($this->monthAndDayFormat);
|
||||||
$endStr = $end->formatLocalized($this->monthAndDayFormat);
|
$endStr = $end->isoFormat($this->monthAndDayFormat);
|
||||||
$subTitle = (string)trans(sprintf('firefly.title_%s_between', $objectType), ['start' => $startStr, 'end' => $endStr]);
|
$subTitle = (string)trans(sprintf('firefly.title_%s_between', $objectType), ['start' => $startStr, 'end' => $endStr]);
|
||||||
|
|
||||||
$firstJournal = $this->repository->firstNull();
|
$firstJournal = $this->repository->firstNull();
|
||||||
|
@@ -57,9 +57,14 @@ class NewIPAddressWarningMail extends Mailable
|
|||||||
public function build(): self
|
public function build(): self
|
||||||
{
|
{
|
||||||
// time
|
// time
|
||||||
$this->time = now()->formatLocalized((string)trans('config.date_time'));
|
|
||||||
|
$this->time = now(config('app.timezone'))->isoFormat((string)trans('config.date_time_js'));
|
||||||
$this->host = '';
|
$this->host = '';
|
||||||
$hostName = gethostbyaddr($this->ipAddress);
|
try {
|
||||||
|
$hostName = gethostbyaddr($this->ipAddress);
|
||||||
|
} catch(\Exception $e) {
|
||||||
|
$hostName = $this->ipAddress;
|
||||||
|
}
|
||||||
if ($hostName !== $this->ipAddress) {
|
if ($hostName !== $this->ipAddress) {
|
||||||
$this->host = $hostName;
|
$this->host = $hostName;
|
||||||
}
|
}
|
||||||
|
@@ -499,7 +499,7 @@ class RecurringRepository implements RecurringRepositoryInterface
|
|||||||
$repDate = Carbon::createFromFormat('Y-m-d', $repetition->repetition_moment);
|
$repDate = Carbon::createFromFormat('Y-m-d', $repetition->repetition_moment);
|
||||||
$diffInYears = $today->diffInYears($repDate);
|
$diffInYears = $today->diffInYears($repDate);
|
||||||
$repDate->addYears($diffInYears); // technically not necessary.
|
$repDate->addYears($diffInYears); // technically not necessary.
|
||||||
$string = $repDate->formatLocalized((string)trans('config.month_and_day_no_year'));
|
$string = $repDate->isoFormat((string)trans('config.month_and_day_no_year_js'));
|
||||||
|
|
||||||
return (string)trans('firefly.recurring_yearly', ['date' => $string], $language);
|
return (string)trans('firefly.recurring_yearly', ['date' => $string], $language);
|
||||||
}
|
}
|
||||||
|
@@ -180,7 +180,7 @@ class UpdateRequest implements UpdateRequestInterface
|
|||||||
$return['message'] = (string)trans(
|
$return['message'] = (string)trans(
|
||||||
'firefly.just_new_release',
|
'firefly.just_new_release',
|
||||||
['version' => $latest,
|
['version' => $latest,
|
||||||
'date' => $released->formatLocalized((string)trans('config.month_and_day')),
|
'date' => $released->isoFormat((string)trans('config.month_and_day_js')),
|
||||||
'days' => $expectedDiff,
|
'days' => $expectedDiff,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
@@ -196,9 +196,7 @@ class UpdateRequest implements UpdateRequestInterface
|
|||||||
[
|
[
|
||||||
'your_version' => $current,
|
'your_version' => $current,
|
||||||
'new_version' => $latest,
|
'new_version' => $latest,
|
||||||
'date' => $released->formatLocalized(
|
'date' => $released->isoFormat((string)trans('config.month_and_day_js'))]
|
||||||
(string)trans('config.month_and_day')
|
|
||||||
)]
|
|
||||||
);
|
);
|
||||||
Log::debug('New release is old enough.');
|
Log::debug('New release is old enough.');
|
||||||
|
|
||||||
|
@@ -187,8 +187,8 @@ class FrontpageChartGenerator
|
|||||||
'%s (%s) (%s - %s)',
|
'%s (%s) (%s - %s)',
|
||||||
$budget->name,
|
$budget->name,
|
||||||
$entry['currency_name'],
|
$entry['currency_name'],
|
||||||
$limit->start_date->formatLocalized($this->monthAndDayFormat),
|
$limit->start_date->isoFormat($this->monthAndDayFormat),
|
||||||
$limit->end_date->formatLocalized($this->monthAndDayFormat)
|
$limit->end_date->isoFormat($this->monthAndDayFormat)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$sumSpent = bcmul($entry['sum'], '-1'); // spent
|
$sumSpent = bcmul($entry['sum'], '-1'); // spent
|
||||||
|
@@ -92,7 +92,7 @@ trait ChartGeneration
|
|||||||
$previous = array_values($range)[0];
|
$previous = array_values($range)[0];
|
||||||
while ($currentStart <= $end) {
|
while ($currentStart <= $end) {
|
||||||
$format = $currentStart->format('Y-m-d');
|
$format = $currentStart->format('Y-m-d');
|
||||||
$label = trim($currentStart->formatLocalized((string)trans('config.month_and_day', [], $locale)));
|
$label = trim($currentStart->isoFormat((string)trans('config.month_and_day_js', [], $locale)));
|
||||||
$balance = $range[$format] ?? $previous;
|
$balance = $range[$format] ?? $previous;
|
||||||
$previous = $balance;
|
$previous = $balance;
|
||||||
$currentStart->addDay();
|
$currentStart->addDay();
|
||||||
|
@@ -98,7 +98,7 @@ trait GetConfigurationData
|
|||||||
$end = session('end');
|
$end = session('end');
|
||||||
/** @var Carbon $first */
|
/** @var Carbon $first */
|
||||||
$first = session('first');
|
$first = session('first');
|
||||||
$title = sprintf('%s - %s', $start->formatLocalized($this->monthAndDayFormat), $end->formatLocalized($this->monthAndDayFormat));
|
$title = sprintf('%s - %s', $start->isoFormat($this->monthAndDayFormat), $end->isoFormat($this->monthAndDayFormat));
|
||||||
$isCustom = true === session('is_custom_range', false);
|
$isCustom = true === session('is_custom_range', false);
|
||||||
$today = today(config('app.timezone'));
|
$today = today(config('app.timezone'));
|
||||||
$ranges = [
|
$ranges = [
|
||||||
|
@@ -356,7 +356,7 @@ class Navigation
|
|||||||
$entries = [];
|
$entries = [];
|
||||||
while ($begin < $end) {
|
while ($begin < $end) {
|
||||||
$formatted = $begin->format($format);
|
$formatted = $begin->format($format);
|
||||||
$displayed = $begin->formatLocalized($displayFormat);
|
$displayed = $begin->isoFormat($displayFormat);
|
||||||
$entries[$formatted] = $displayed;
|
$entries[$formatted] = $displayed;
|
||||||
$begin->$increment();
|
$begin->$increment();
|
||||||
}
|
}
|
||||||
@@ -413,7 +413,7 @@ class Navigation
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (array_key_exists($repeatFrequency, $formatMap)) {
|
if (array_key_exists($repeatFrequency, $formatMap)) {
|
||||||
return $date->formatLocalized((string)$formatMap[$repeatFrequency]);
|
return $date->isoFormat((string)$formatMap[$repeatFrequency]);
|
||||||
}
|
}
|
||||||
if ('3M' === $repeatFrequency || 'quarter' === $repeatFrequency) {
|
if ('3M' === $repeatFrequency || 'quarter' === $repeatFrequency) {
|
||||||
$quarter = ceil($theDate->month / 3);
|
$quarter = ceil($theDate->month / 3);
|
||||||
@@ -440,13 +440,13 @@ class Navigation
|
|||||||
public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string
|
public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string
|
||||||
{
|
{
|
||||||
$locale = app('steam')->getLocale();
|
$locale = app('steam')->getLocale();
|
||||||
$format = (string)trans('config.month_and_day', [], $locale);
|
$format = (string)trans('config.month_and_day_js', [], $locale);
|
||||||
if ($start->diffInMonths($end) > 1) {
|
if ($start->diffInMonths($end) > 1) {
|
||||||
$format = (string)trans('config.month', [], $locale);
|
$format = (string)trans('config.month_js', [], $locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($start->diffInMonths($end) > 12) {
|
if ($start->diffInMonths($end) > 12) {
|
||||||
$format = (string)trans('config.year', [], $locale);
|
$format = (string)trans('config.year_js', [], $locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $format;
|
return $format;
|
||||||
|
@@ -369,7 +369,7 @@ class General extends AbstractExtension
|
|||||||
function (string $date, string $format): string {
|
function (string $date, string $format): string {
|
||||||
$carbon = new Carbon($date);
|
$carbon = new Carbon($date);
|
||||||
|
|
||||||
return $carbon->formatLocalized($format);
|
return $carbon->isoFormat($format);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
63
composer.lock
generated
63
composer.lock
generated
@@ -480,16 +480,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/dbal",
|
"name": "doctrine/dbal",
|
||||||
"version": "3.3.3",
|
"version": "3.3.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/dbal.git",
|
"url": "https://github.com/doctrine/dbal.git",
|
||||||
"reference": "82331b861727c15b1f457ef05a8729e508e7ead5"
|
"reference": "83f779beaea1893c0bece093ab2104c6d15a7f26"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/dbal/zipball/82331b861727c15b1f457ef05a8729e508e7ead5",
|
"url": "https://api.github.com/repos/doctrine/dbal/zipball/83f779beaea1893c0bece093ab2104c6d15a7f26",
|
||||||
"reference": "82331b861727c15b1f457ef05a8729e508e7ead5",
|
"reference": "83f779beaea1893c0bece093ab2104c6d15a7f26",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -571,7 +571,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/doctrine/dbal/issues",
|
"issues": "https://github.com/doctrine/dbal/issues",
|
||||||
"source": "https://github.com/doctrine/dbal/tree/3.3.3"
|
"source": "https://github.com/doctrine/dbal/tree/3.3.4"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -587,7 +587,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-09T15:39:50+00:00"
|
"time": "2022-03-20T18:37:29+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/deprecations",
|
"name": "doctrine/deprecations",
|
||||||
@@ -4768,25 +4768,24 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ramsey/uuid",
|
"name": "ramsey/uuid",
|
||||||
"version": "4.2.3",
|
"version": "4.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/ramsey/uuid.git",
|
"url": "https://github.com/ramsey/uuid.git",
|
||||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df"
|
"reference": "8ced2afadd9ce455e2d5919d27c57e344bae4a09"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
"url": "https://api.github.com/repos/ramsey/uuid/zipball/8ced2afadd9ce455e2d5919d27c57e344bae4a09",
|
||||||
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
|
"reference": "8ced2afadd9ce455e2d5919d27c57e344bae4a09",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"brick/math": "^0.8 || ^0.9",
|
"brick/math": "^0.8 || ^0.9",
|
||||||
|
"ext-ctype": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"php": "^7.2 || ^8.0",
|
"php": "^8.0",
|
||||||
"ramsey/collection": "^1.0",
|
"ramsey/collection": "^1.0"
|
||||||
"symfony/polyfill-ctype": "^1.8",
|
|
||||||
"symfony/polyfill-php80": "^1.14"
|
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
"rhumsaa/uuid": "self.version"
|
"rhumsaa/uuid": "self.version"
|
||||||
@@ -4850,7 +4849,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/ramsey/uuid/issues",
|
"issues": "https://github.com/ramsey/uuid/issues",
|
||||||
"source": "https://github.com/ramsey/uuid/tree/4.2.3"
|
"source": "https://github.com/ramsey/uuid/tree/4.3.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -4862,7 +4861,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-09-25T23:10:38+00:00"
|
"time": "2022-03-26T22:00:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rcrowe/twigbridge",
|
"name": "rcrowe/twigbridge",
|
||||||
@@ -5131,16 +5130,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/ignition",
|
"name": "spatie/ignition",
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/ignition.git",
|
"url": "https://github.com/spatie/ignition.git",
|
||||||
"reference": "982f69f3c2e525cef62fa23ada047d745e4bcda9"
|
"reference": "be24d33a9de271638314924b5da85e168e4148e4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/982f69f3c2e525cef62fa23ada047d745e4bcda9",
|
"url": "https://api.github.com/repos/spatie/ignition/zipball/be24d33a9de271638314924b5da85e168e4148e4",
|
||||||
"reference": "982f69f3c2e525cef62fa23ada047d745e4bcda9",
|
"reference": "be24d33a9de271638314924b5da85e168e4148e4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5197,20 +5196,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-19T14:07:30+00:00"
|
"time": "2022-03-23T11:02:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-ignition",
|
"name": "spatie/laravel-ignition",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/laravel-ignition.git",
|
"url": "https://github.com/spatie/laravel-ignition.git",
|
||||||
"reference": "5b8c360d1f6bcba339a6d593efa02816c06d17c3"
|
"reference": "f3243fd99351e0a79df6886a5354d8dd88d6d0d2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/5b8c360d1f6bcba339a6d593efa02816c06d17c3",
|
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/f3243fd99351e0a79df6886a5354d8dd88d6d0d2",
|
||||||
"reference": "5b8c360d1f6bcba339a6d593efa02816c06d17c3",
|
"reference": "f3243fd99351e0a79df6886a5354d8dd88d6d0d2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5284,7 +5283,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-19T17:03:56+00:00"
|
"time": "2022-03-21T07:13:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
@@ -7745,16 +7744,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.3.8",
|
"version": "v3.3.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "972d8604a92b7054828b539f2febb0211dd5945c"
|
"reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d",
|
||||||
"reference": "972d8604a92b7054828b539f2febb0211dd5945c",
|
"reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -7805,7 +7804,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.3.8"
|
"source": "https://github.com/twigphp/Twig/tree/v3.3.9"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -7817,7 +7816,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-02-04T06:59:48+00:00"
|
"time": "2022-03-25T09:37:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
|
@@ -25,25 +25,35 @@ declare(strict_types=1);
|
|||||||
return [
|
return [
|
||||||
'html_language' => 'en',
|
'html_language' => 'en',
|
||||||
'locale' => 'en, English, en_US.utf8, en_US.UTF-8',
|
'locale' => 'en, English, en_US.utf8, en_US.UTF-8',
|
||||||
'month' => '%B %Y',
|
//'month' => '%B %Y',
|
||||||
'month_and_day' => '%B %e, %Y',
|
'month_js' => 'MMMM YYYY',
|
||||||
|
|
||||||
|
//'month_and_day' => '%B %e, %Y',
|
||||||
'month_and_day_moment_js' => 'MMM D, YYYY',
|
'month_and_day_moment_js' => 'MMM D, YYYY',
|
||||||
'month_and_day_fns' => 'MMMM d, y',
|
'month_and_day_fns' => 'MMMM d, y',
|
||||||
'month_and_date_day' => '%A %B %e, %Y',
|
|
||||||
'month_and_day_no_year' => '%B %e',
|
|
||||||
'date_time' => '%B %e, %Y, @ %T',
|
|
||||||
'specific_day' => '%e %B %Y',
|
|
||||||
'week_in_year' => 'Week %V, %G',
|
|
||||||
'year' => '%Y',
|
|
||||||
'half_year' => '%B %Y',
|
|
||||||
'month_js' => 'MMMM YYYY',
|
|
||||||
'month_and_day_js' => 'MMMM Do, YYYY',
|
'month_and_day_js' => 'MMMM Do, YYYY',
|
||||||
|
|
||||||
|
//'month_and_date_day' => '%A %B %e, %Y',
|
||||||
|
|
||||||
|
//'month_and_day_no_year' => '%B %e',
|
||||||
|
'month_and_day_no_year_js' => 'MMMM Do',
|
||||||
|
|
||||||
|
//'date_time' => '%B %e, %Y, @ %T',
|
||||||
'date_time_js' => 'MMMM Do, YYYY, @ HH:mm:ss',
|
'date_time_js' => 'MMMM Do, YYYY, @ HH:mm:ss',
|
||||||
|
|
||||||
|
//'specific_day' => '%e %B %Y',
|
||||||
'specific_day_js' => 'D MMMM YYYY',
|
'specific_day_js' => 'D MMMM YYYY',
|
||||||
|
|
||||||
|
//'week_in_year' => 'Week %V, %G',
|
||||||
'week_in_year_js' => '[Week] w, YYYY',
|
'week_in_year_js' => '[Week] w, YYYY',
|
||||||
'week_in_year_fns' => "'Week' w, yyyy",
|
'week_in_year_fns' => "'Week' w, yyyy",
|
||||||
|
|
||||||
|
//'year' => '%Y',
|
||||||
'year_js' => 'YYYY',
|
'year_js' => 'YYYY',
|
||||||
|
|
||||||
|
//'half_year' => '%B %Y',
|
||||||
'half_year_js' => 'Q YYYY',
|
'half_year_js' => 'Q YYYY',
|
||||||
|
|
||||||
'quarter_fns' => "'Q'Q, yyyy",
|
'quarter_fns' => "'Q'Q, yyyy",
|
||||||
'half_year_fns' => "'H{half}', yyyy",
|
'half_year_fns' => "'H{half}', yyyy",
|
||||||
'dow_1' => 'Monday',
|
'dow_1' => 'Monday',
|
||||||
|
Reference in New Issue
Block a user