Bug 6819: Hide individual cancel order links when order line has been received
This is to prevent mistakes - a received order should not be cancelled, but 'undo receive' needs to be done first for things to turn out correctly. To test: - Create a basket with at least 2 orders - Close basket - Receive one of your orders at least - Go back to the basket - Reopen basket - The cancel links should only show on the "not received" orders Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
3edbe7d7dc
commit
974c93f908
|
|
@ -558,27 +558,29 @@
|
|||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
[% IF ( books_loo.left_holds_on_order ) %]
|
||||
<span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
|
||||
[% ELSE %]
|
||||
<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.can_del_bib ) %]
|
||||
<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
|
||||
[% ELSE %]
|
||||
<span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_item ) %]
|
||||
<strong title="Can't delete catalog record, because of [% books_loo.items | html %] existing hold(s)" >[% books_loo.items | html %] item(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_biblio ) %]
|
||||
<strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_subscription ) %]
|
||||
<strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_holds ) %]
|
||||
<strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
|
||||
[% IF ( books_loo.orderstatus != "complete") %]
|
||||
[% IF ( books_loo.left_holds_on_order ) %]
|
||||
<span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
|
||||
[% ELSE %]
|
||||
<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.can_del_bib ) %]
|
||||
<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
|
||||
[% ELSE %]
|
||||
<span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_item ) %]
|
||||
<strong title="Can't delete catalog record, because of [% books_loo.items | html %] existing hold(s)" >[% books_loo.items | html %] item(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_biblio ) %]
|
||||
<strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_subscription ) %]
|
||||
<strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br>
|
||||
[% END %]
|
||||
[% IF ( books_loo.left_holds ) %]
|
||||
<strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</td>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue