Fixing hierarchy processing
[koha.git] / acqui / supplier.pl
index 1a8be5b..4db98d6 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 #script to show display basket of orders
 #written by chris@katipo.co.nz 24/2/2000
@@ -54,7 +53,7 @@ use C4::Bookfund;
 
 my $query=new CGI;
 my $id=$query->param('supplierid');
-my @booksellers = GetBookSeller($id) if $id;
+my @booksellers = GetBookSellerFromId($id) if $id;
 my $count = scalar @booksellers;
 my $op=$query->param('op') || "display";
 
@@ -96,8 +95,13 @@ if ($op eq "display"){
                     invoiceprice=>$booksellers[0]->{'invoiceprice'},
                     listprice=>$booksellers[0]->{'listprice'},
                     GST => C4::Context->preference("gist"),
+                    basketcount =>$booksellers[0]->{'basketcount'},
                     );
-}else{
+} elsif ($op eq 'delete') {
+    &DelBookseller($id);
+    print $query->redirect("/cgi-bin/koha/acqui/acqui-home.pl");
+    exit;
+} else {
     my @currencies = GetCurrencies();
     my $count = scalar @currencies;