From 8e978c7ce0edd51ee52ffb977dd1361ae3177311 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2013 15:16:09 +0100 Subject: [PATCH] Bug 5343: It is not possible to add a subscription for another supplier If a supplier is defined for a subscription, you cannot order this subscription to another supplier. If no supplier is defined, you can. FIX: If a cancelled order is linked to a subscription, you can order it. Signed-off-by: Leila Arkab Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- C4/Serials.pm | 1 + .../prog/en/modules/acqui/newordersubscription.tt | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index a1816408d4..a1597c8a13 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2746,6 +2746,7 @@ sub subscriptionCurrentlyOnOrder { SELECT COUNT(*) FROM aqorders WHERE subscriptionid = ? AND datereceived IS NULL + AND datecancellationprinted IS NULL |; my $sth = $dbh->prepare( $query ); $sth->execute($subscriptionid); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt index 4ca5e31145..dd01d19e33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt @@ -22,7 +22,6 @@ $(document).ready(function() { $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumnDefs": [ - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, [% IF (dateformat == 'metric') %] { "aTargets": [ -2 ], "sType": "uk_date" }, [% END %] @@ -95,10 +94,12 @@ [% IF (sub.alreadyOnOrder) %] Outstanding order (only one order per subscription is allowed) - [% ELSE %] + [% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%] Order + [% ELSE %] + Not orderable [% END %] -- 2.39.5