[Koha-cvs] koha/acqui order.pl
Antoine Farnault
antoine at koha-fr.org
Mon Jul 24 09:42:29 CEST 2006
CVSROOT: /sources/koha
Module name: koha
Changes by: Antoine Farnault <toins> 06/07/24 07:42:29
Modified files:
acqui : order.pl
Log message:
Code cleaning : POD added & some functions has been changed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/order.pl?cvsroot=koha&r1=1.16&r2=1.17
Patches:
Index: order.pl
===================================================================
RCS file: /sources/koha/koha/acqui/order.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- order.pl 7 Jun 2006 19:49:11 -0000 1.16
+++ order.pl 24 Jul 2006 07:42:28 -0000 1.17
@@ -1,7 +1,5 @@
#!/usr/bin/perl
-# $Id: order.pl,v 1.16 2006/06/07 19:49:11 sushi Exp $
-
#script to show suppliers and orders
#written by chris at 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: order.pl,v 1.17 2006/07/24 07:42:28 toins Exp $
+
+=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<OP> can be equals to 'close' if we have to close a basket before building the page.
+
+=item basket
+the C<basket> we have to close if op is equal to 'close'.
+
+=cut
+
use strict;
use C4::Auth;
use C4::Biblio;
@@ -45,21 +71,26 @@
}
);
+#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;
More information about the Koha-cvs
mailing list