This commit is contained in:
James Cole
2025-10-31 06:30:56 +01:00
parent 2aabb56d2d
commit 40c4c9f109
3 changed files with 9 additions and 11 deletions

View File

@@ -96,11 +96,10 @@ class CreateController extends Controller
];
// interest calculation periods:
$interestPeriods = [
'daily' => (string) trans('firefly.interest_calc_daily'),
'monthly' => (string) trans('firefly.interest_calc_monthly'),
'yearly' => (string) trans('firefly.interest_calc_yearly'),
];
$interestPeriods = [];
foreach(config('firefly.interest_periods') as $period) {
$interestPeriods[$period] = trans(sprintf('firefly.interest_calc_%s' , $period));
}
// pre fill some data
$request->session()->flash(

View File

@@ -108,11 +108,10 @@ class EditController extends Controller
];
// interest calculation periods:
$interestPeriods = [
'daily' => (string) trans('firefly.interest_calc_daily'),
'monthly' => (string) trans('firefly.interest_calc_monthly'),
'yearly' => (string) trans('firefly.interest_calc_yearly'),
];
$interestPeriods = [];
foreach(config('firefly.interest_periods') as $period) {
$interestPeriods[$period] = trans(sprintf('firefly.interest_calc_%s' , $period));
}
// put previous url in session if not redirect from store (not "return_to_edit").
if (true !== session('accounts.edit.fromUpdate')) {

View File

@@ -309,7 +309,7 @@ return [
// "period must be in this list" values
'bill_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'interest_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
'interest_periods' => ['daily', 'weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
// settings to translate X to Y
'range_to_repeat_freq' => [