@@ -, +, @@ - 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 @@ -15,6 +15,8 @@
[% CASE 'wrong_csrf_token' %] + [% CASE 'budget_is_locked' %] + [% 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 @@