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: // interest calculation periods:
$interestPeriods = [ $interestPeriods = [];
'daily' => (string) trans('firefly.interest_calc_daily'), foreach(config('firefly.interest_periods') as $period) {
'monthly' => (string) trans('firefly.interest_calc_monthly'), $interestPeriods[$period] = trans(sprintf('firefly.interest_calc_%s' , $period));
'yearly' => (string) trans('firefly.interest_calc_yearly'), }
];
// pre fill some data // pre fill some data
$request->session()->flash( $request->session()->flash(

View File

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

View File

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