Bug 7358: reaffect a closed basket to a closed basketgroup

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug 7358: reaffect a closed basket to a closed basketgroup

Henri-Damien LAURENT
From: Admin User Koha <[hidden email]>

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

_______________________________________________
Koha-patches mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/