@@ -, +, @@ - Create a budget, lock it - Go to /cgi-bin/koha/admin/aqbudgetperiods.pl - Click on the name of the budget you just created - Click it anyway - Hit /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=XXX "The budget is locked, fund creation is not possible." --- admin/aqbudgets.pl | 2 ++ koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc | 2 ++ koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -115,6 +115,8 @@ if ($op eq 'add_form') { } $dropbox_disabled = BudgetHasChildren($budget_id); $budget->{budget_owner} = Koha::Patrons->find( $budget->{budget_owner_id} ); + } elsif ( $period->{budget_period_locked} ) { + output_and_exit( $input, $cookie, $template, 'budget_is_locked' ); } # build budget hierarchy --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc @@ -13,6 +13,8 @@
Basket not found.
[% CASE 'wrong_csrf_token' %]
The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.
+ [% CASE 'budget_is_locked' %] +
The budget is locked, fund creation is not possible.
[% CASE %][% blocking_error | html %] [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc @@ -7,10 +7,13 @@
  • New budget
  • [% IF ( budget_period_locked || !CAN_user_acquisition_budget_add_del ) %]
  • + New fund for [% budget_period_description | html %] +
  • [% ELSE %]
  • + New fund for [% budget_period_description | html %] +
  • [% END %] - New fund for [% budget_period_description | html %] --