Koha/koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc
Katrin Fischer a4b7490633
Bug 34469: Block editing for received order lines
When an already received order line is modified/edited,
we experience data loss. Most prominently, we will lose the
linked invoiceid. Therefore we should not allow editing an
order line that was already received. If something needs to be
changed, the receipt should be cancelled first.

To test:
* Create basket as standing order with items added in cataloguing
* Add an order line
* Receive shipment
* Go to the basket summary page, click on 'Modify'
* Change the actual cost
* Save
* Verify that the invoice is now empty
* In the database aqorders.invoiceid will be NULL
* Apply patch
* Receive another shipment for the standing order
* Go back to basket summary page
* Verify the 'Modify' link is no longer present
* Click 'Modify' on the unreceived order line
* Edit the URL parameter odernumber to have the number of an
  already received order line
* Verify you see a nice error message:
  This order cannot be edited, the basket is closed or the order was already received.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-08-15 12:16:50 +03:00

31 lines
1.8 KiB
HTML

[% IF blocking_error %]
[% SWITCH blocking_error %]
[% CASE 'unknown_patron' %]
<div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
[% CASE 'cannot_see_patron_infos' %]This account cannot view requested patron information.
[% CASE 'unknown_biblio' %]
<div class="dialog message">Bibliographic record not found.</div>
[% CASE 'unknown_item' %]
<div class="dialog message">Item not found.</div>
[% CASE 'unknown_subscription' %]
<div class="dialog message">Subscription not found.</div>
[% CASE 'unknown_basket' %]
<div class="dialog message">Basket not found.</div>
[% CASE 'unknown_vendor' %]
<div class="dialog message">Vendor not found.</div>
[% CASE 'order_cannot_be_edited' %]
<div class="dialog message">This order cannot be edited, the basket is closed or the order was already received.</div>
[% CASE 'wrong_csrf_token' %]
<div class="dialog message">The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.</div>
[% CASE 'budget_is_locked' %]
<div class="dialog message">The budget is locked, fund creation is not possible.</div>
[% CASE 'missing_es_modules' %]
<div class="dialog message">Necessary Elasticsearch packages are not installed on your server. Please contact your server admin if you wish to configure Elasticsearch</div>
[% CASE 'insufficient_permission' %]
<div class="dialog message">You do not have sufficient permission to continue.</div>
[% CASE %][% blocking_error | html %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]
[% STOP %] [%# Will stop gracefully without processing any more of the template document.%]
[% END %]