@@ -, +, @@ --- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -1,3 +1,4 @@ +[% USE Koha %] [% USE currency = format('%.2f') -%] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% IF ( date ) %] @@ -441,7 +442,8 @@ <td>[% order.unitprice %]</td> <td>[% order.total %]</td> <td> - [% IF (order.cannot_cancel) %] + [% IF loop_receive.cannot_cancel or ( Koha.Preference("AcqCreateItem") == "receiving" and loop_receive.holds > 0 ) %] + [% IF loop_receive.cannot_cancel %] [% span_title = BLOCK %] Cannot cancel receipt of this order line because it was created from a partial receipt of order line no. @@ -449,9 +451,16 @@ already received. Try cancelling this one first and retry. [% END %] - <span title="[% span_title | collapse %]"> - Can't cancel receipt - </span> + [% ELSE %] + [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %] + [%# Some additional checks should be added in the pl file %] + [% span_title = BLOCK %] + Cannot cancel receipt of this order line because at least one reservation exists on the records. + [% END %] + [% END %] + <span title="[% span_title | collapse %]"> + Can't cancel receipt + </span> [% ELSE %] <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a> [% END %] --