Bug 9662: Followup for acquisition
[koha.git] / acqui / basket.pl
index ace6b63..f203af2 100755 (executable)
@@ -65,7 +65,7 @@ the supplier this script have to display the basket.
 =cut
 
 my $query        = new CGI;
-my $basketno     = $query->param('basketno');
+our $basketno     = $query->param('basketno');
 my $booksellerid = $query->param('booksellerid');
 
 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
@@ -206,13 +206,14 @@ if ( $op eq 'delete_confirm' ) {
         }
     }
 #if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups
-    my $basketgroups;
+    my ($basketgroup, $basketgroups);
     my $member = GetMember(borrowernumber => $loggedinuser);
     if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) {
         $basketgroups = GetBasketgroups($basket->{booksellerid});
         for my $bg ( @{$basketgroups} ) {
             if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
                 $bg->{default} = 1;
+                $basketgroup = $bg;
             }
         }
         my %emptygroup = ( id   =>   undef,
@@ -339,6 +340,7 @@ if ( $op eq 'delete_confirm' ) {
         currency             => $cur->{'currency'},
         listincgst           => $bookseller->{listincgst},
         basketgroups         => $basketgroups,
+        basketgroup          => $basketgroup,
         grouped              => $basket->{basketgroupid},
         unclosable           => @orders ? 0 : 1, 
         has_budgets          => $has_budgets,