From a70a0a1c9ee3acda6c840450e8b01b5bdcd1ecfc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2013 15:16:09 +0100 Subject: [PATCH] [PASSED QA] 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 --- 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 3492e09..b8b53ed 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2548,6 +2548,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 4ca5e31..dd01d19 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 %] -- 1.7.9.5