[Patches] [PATCH] Bug 7358: reaffect a closed basket to a closed basketgroup

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Wed Dec 21 03:11:05 NZDT 2011


From: Admin User Koha <koha at biblibre.com>
Date: Wed, 14 Dec 2011 15:18:33 +0100
Subject: [PATCH] Bug 7358: reaffect a closed basket to a closed basketgroup

The list of basketgroups when looking at a closed basket show all the basketgroups.
It should not be possible to affect a basket to a closed basketgroup,
since this basketgroup should have been sent to a supplier.
---
 acqui/basket.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index b836280..60a46f0 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -199,6 +199,7 @@ if ( $op eq 'delete_confirm' ) {
     my $member = GetMember(borrowernumber => $loggedinuser);
     if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
         $basketgroups = GetBasketgroups($basket->{booksellerid});
+        @$basketgroups= grep {!$_->{closed}} @$basketgroups;
         for my $bg ( @{$basketgroups} ) {
             if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
                 $bg->{default} = 1;
-- 
1.7.2.5




More information about the Patches mailing list