koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/acqui parcel.pl


From: Antoine Farnault
Subject: [Koha-cvs] koha/acqui parcel.pl
Date: Mon, 31 Jul 2006 09:31:58 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Antoine Farnault <toins>        06/07/31 09:31:58

Modified files:
        acqui          : parcel.pl 

Log message:
        Code cleaned. POD added. Subs renamed/rewrited/added.... 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/parcel.pl?cvsroot=koha&r1=1.1&r2=1.2

Patches:
Index: parcel.pl
===================================================================
RCS file: /sources/koha/koha/acqui/parcel.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- parcel.pl   13 Jul 2006 14:25:01 -0000      1.1
+++ parcel.pl   31 Jul 2006 09:31:58 -0000      1.2
@@ -1,7 +1,6 @@
- 
 #!/usr/bin/perl
 
-# $Id: parcel.pl,v 1.1 2006/07/13 14:25:01 toins Exp $
+# $Id: parcel.pl,v 1.2 2006/07/31 09:31:58 toins Exp $
 
 #script to recieve orders
 #written by address@hidden 24/2/2000
@@ -24,8 +23,41 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
+
+=head1 NAME
+
+parcel.pl
+
+=head1 DESCRIPTION
+This script shows all orders receipt or pending for a given supplier.
+It allows to write an order as 'received' when he arrives.
+
+=head1 CGI PARAMETERS
+
+=over 4
+
+=item supplierid
+To know the supplier this script has to show orders.
+
+=item code
+is the bookseller invoice number.
+
+=item freight
+
+
+=item gst
+
+
+=item datereceived
+To filter the results list on this given date.
+
+=back
+
+=cut
+
 use C4::Auth;
 use C4::Acquisition;
+use C4::Bookseller;
 use C4::Biblio;
 use C4::Output;
 use CGI;
@@ -36,7 +68,9 @@
 
 my $input=new CGI;
 my $supplierid=$input->param('supplierid');
-my ($count,@booksellers)=bookseller($supplierid);
+my @booksellers=GetBookSeller($supplierid);
+my $count = scalar @booksellers;
+
 my $invoice=$input->param('code') || '';
 my $freight=$input->param('freight');
 my $gst=$input->param('gst');
@@ -52,7 +86,9 @@
                  debug => 1,
 });
 
-my ($countlines,@parcelitems)=getparcelinformation($supplierid,$invoice,$date);
+my @parcelitems=GetParcel($supplierid,$invoice,$date);
+my $countlines = scalar @parcelitems;
+
 my $totalprice=0;
 my $totalfreight=0;
 my $totalquantity=0;
@@ -91,7 +127,9 @@
     $totalquantity+=$parcelitems[$i]->{'quantityreceived'};
     $tototal+=$total;
 }
-my ($countpendings,@pendingorders)=getallorders($supplierid);
+my @pendingorders = GetAllOrders($supplierid);
+my $countpendings = scalar @pendingorders;
+
 my @loop_orders = ();
 for (my $i=0;$i<$countpendings;$i++){
     my %line;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]