From 84ec6c55a245ad9fa701598caf9caa5d83bda5f8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 28 Apr 2015 10:10:56 +0200 Subject: [PATCH 1/1] Bug 12054: Inactive vendors should be inactive This patch make inactive vendors really inactive. That means an inactive vendor won't be able to receive / add a basket / add an order. Test plan: In the acquisition module create 2 vendors: 1 active and 1 inactive. On the acqui/booksellers.pl, acqui/uncertainprice.pl, admin/aqcontract.pl and acqui/supplier.pl (pages which include the acq toolbar) pages, confirm that you are not able to receive shipments, create a new basket, add a new order for the inactive vendor. No change should exist for the active vendor. --- acqui/booksellers.pl | 3 ++- acqui/uncertainprice.pl | 1 + admin/aqcontract.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt | 7 ++++++- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl index 43dc024..b56f73e 100755 --- a/acqui/booksellers.pl +++ b/acqui/booksellers.pl @@ -93,7 +93,8 @@ if ( $supplier_count == 1 ) { $template->param( supplier_name => $suppliers[0]->{'name'}, booksellerid => $suppliers[0]->{'id'}, - basketcount => $suppliers[0]->{'basketcount'} + basketcount => $suppliers[0]->{'basketcount'}, + active => $suppliers[0]->{active}, ); } diff --git a/acqui/uncertainprice.pl b/acqui/uncertainprice.pl index 6213357..cf0b600 100755 --- a/acqui/uncertainprice.pl +++ b/acqui/uncertainprice.pl @@ -129,6 +129,7 @@ $template->param( uncertainpriceorders => \@orders, booksellernotes => $bookseller->{'notes'}, basketcount => $bookseller->{'basketcount'}, subscriptioncount => $bookseller->{'subscriptioncount'}, + active => $bookseller->{active}, owner => $owner, scriptname => "/cgi-bin/koha/acqui/uncertainprice.pl"); $template->{'VARS'}->{'contacts'} = $bookseller->{'contacts'}; diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index 095d70c..daf8fb4 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -53,6 +53,7 @@ $template->param( booksellerid => $booksellerid, booksellername => $bookseller->{name}, basketcount => $bookseller->{'basketcount'}, + active => $bookseller->{active}, subscriptioncount => $bookseller->{'subscriptioncount'}, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc index 5308b5a..41d80d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc @@ -14,10 +14,10 @@ function confirm_deletion() {