diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 80d43543f3..60f1435e58 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -135,6 +135,16 @@ my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); output_and_exit( $input, $cookie, $template, 'unknown_basket') unless $basketobj; output_and_exit( $input, $cookie, $template, 'unknown_vendor') unless $bookseller; +$template->param( + ordernumber => $ordernumber, + basketno => $basketno, + basket => $basket, + booksellerid => $basket->{'booksellerid'}, + name => $bookseller->name, +); +output_and_exit( $input, $cookie, $template, 'order_cannot_be_edited' ) + if $ordernumber and $basketobj->closedate; + my $contract = GetContract({ contractnumber => $basket->{contractnumber} }); @@ -397,10 +407,7 @@ $quantity //= 0; # fill template $template->param( existing => $biblionumber, - ordernumber => $ordernumber, # basket informations - basketno => $basketno, - basket => $basket, basketname => $basket->{'basketname'}, basketnote => $basket->{'note'}, booksellerid => $basket->{'booksellerid'}, @@ -425,7 +432,6 @@ $template->param( order_vendornote => $data->{'order_vendornote'}, listincgst => $bookseller->listincgst, invoiceincgst => $bookseller->invoiceincgst, - name => $bookseller->name, cur_active_sym => $active_currency->symbol, cur_active => $active_currency->currency, currencies => \@currencies, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc index 146264a10f..0bd778b76c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc @@ -13,6 +13,8 @@
Basket not found.
[% CASE 'unknown_vendor' %]
Vendor not found.
+ [% CASE 'order_cannot_be_edited' %] +
This order cannot be edited, the basket is closed.
[% 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' %]