From 3eca757a2750ac553e2c18b0a5aee24982df6235 Mon Sep 17 00:00:00 2001 From: toins Date: Mon, 24 Jul 2006 07:42:28 +0000 Subject: [PATCH] Code cleaning : POD added & some functions has been changed. --- acqui/order.pl | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/acqui/order.pl b/acqui/order.pl index 193ff421c8..974614b096 100755 --- a/acqui/order.pl +++ b/acqui/order.pl @@ -1,7 +1,5 @@ #!/usr/bin/perl -# $Id$ - #script to show suppliers and orders #written by chris@katipo.co.nz 23/2/2000 @@ -22,6 +20,34 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA +# $Id$ + +=head1 NAME + +order.pl + +=head1 DESCRIPTION + +this script displays the list of suppliers & orders like C<$supplier> given on input arg. +thus, this page brings differents features like to display supplier's details, +to add an order for a specific supplier or to just add a new supplier. + +=head1 CGI PARAMETERS + +=over 4 + +=item supplier +C<$supplier> is the suplier we have to search order. +=back + +=item op +C can be equals to 'close' if we have to close a basket before building the page. + +=item basket +the C we have to close if op is equal to 'close'. + +=cut + use strict; use C4::Auth; use C4::Biblio; @@ -45,21 +71,26 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +#parameters my $supplier = $query->param('supplier'); -my ( $count, @suppliers ) = bookseller($supplier); + +my @suppliers = GetBookSeller($supplier); +my $count = scalar @suppliers; # check if we have to "close" a basket before building page my $op = $query->param('op'); my $basket = $query->param('basket'); if ( $op eq 'close' ) { - closebasket($basket); + CloseBasket($basket); } #build result page my $toggle = 0; my @loop_suppliers; for ( my $i = 0 ; $i < $count ; $i++ ) { - my ( $ordcount, $orders ) = getorders( $suppliers[$i]->{'id'} ); + my $orders = GetOrders( $suppliers[$i]->{'id'} ); + my $ordcount = scalar @$orders; + my %line; if ( $toggle == 0 ) { $line{even} = 1; @@ -93,7 +124,7 @@ $template->param( supplier => $supplier, count => $count, intranetcolorstylesheet => - C4::Context->preference("intranetcolorstylesheet"), + C4::Context->preference("intranetcolorstylesheet"), intranetstylesheet => C4::Context->preference("intranetstylesheet"), IntranetNav => C4::Context->preference("IntranetNav"), ); -- 2.20.1