@@ -, +, @@ --- .../prog/en/modules/acqui/orderreceive.tt | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -393,10 +393,15 @@ @@ -873,6 +878,9 @@ $("#quantity").val(qty); var row = $("#order_edit").data('row'); row.quantity_received = qty; + [% IF multiple_orders.split(',').size == 1 %] + $('.modal-save').prop('disabled', qty < 1 ); + [% END %] }) $("#order_edit").on("change", "#tax_rate", function() { @@ -1317,7 +1325,11 @@ }); $("#order_edit").on("hide.bs.modal", function() { + [% IF multiple_orders.split(',').size == 1 %] [%# On the single case, dismissing the modal equals to cancelling %] + location.href = "/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&sticky_filters=1"; + [% ELSE %] $("#child_orders_table").DataTable().off('preDraw').destroy(); + [% END %] }); }); --