koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui orderreceive.pl


From: Antoine Farnault
Subject: [Koha-cvs] koha/acqui orderreceive.pl
Date: Mon, 31 Jul 2006 14:40:54 +0000

CVSROOT:        /sources/koha
Module name:    koha
Changes by:     Antoine Farnault <toins>        06/07/31 14:40:54

Modified files:
        acqui          : orderreceive.pl 

Log message:
        POD added. Call to Bookfund.pm & Bookseller.pm added. Some sub 
renamed/API changed.

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

Patches:
Index: orderreceive.pl
===================================================================
RCS file: /sources/koha/koha/acqui/orderreceive.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- orderreceive.pl     13 Jul 2006 14:25:27 -0000      1.1
+++ orderreceive.pl     31 Jul 2006 14:40:54 -0000      1.2
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: orderreceive.pl,v 1.1 2006/07/13 14:25:27 toins Exp $
+# $Id: orderreceive.pl,v 1.2 2006/07/31 14:40:54 toins Exp $
 
 #script to recieve orders
 #written by address@hidden 24/2/2000
@@ -21,6 +21,40 @@
 # You should have received a copy of the GNU General Public License along with
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+orderreceive.pl
+
+=head1 DESCRIPTION
+This script shows all order already receive and all pendings orders.
+It permit to write a new order as 'received'.
+
+=head1 CGI PARAMETERS
+
+=over 4
+
+=item supplierid
+to know on what supplier this script has to display receive order.
+
+=item recieve
+
+=item invoice
+the number of this invoice.
+
+=item freight
+
+=item biblio
+The biblionumber of this order.
+
+=item catview
+
+=item gst
+
+=back
+
+=cut
+
 use strict;
 use CGI;
 use C4::Context;
@@ -29,6 +63,8 @@
 use C4::Auth;
 use C4::Interface::CGI::Output;
 use C4::Date;
+use C4::Bookseller;
+use C4::Members;
 
 my $input      = new CGI;
 my $supplierid = $input->param('supplierid');
@@ -40,11 +76,12 @@
 my $biblio  = $input->param('biblio');
 my $catview = $input->param('catview');
 my $gst     = $input->param('gst');
-my ( $count, @results ) =
-  ordersearch( $search, $supplierid, $biblio, $catview );
+my @results = SearchOrder( $search, $supplierid, $biblio, $catview );
+my $count = scalar @results;
 
 # warn "C:$count for ordersearch($search,$supplierid,$biblio,$catview);";
-my ( $count2, @booksellers ) = bookseller( $results[0]->{'booksellerid'} );
+my @booksellers = GetBookSeller( $results[0]->{'booksellerid'} );
+
 my $date = $results[0]->{'entrydate'};
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -58,16 +95,12 @@
 }
 );
 $template->param($count);
-my $sthtemp =
-  $dbh->prepare(
-    "Select flags, branchcode from borrowers where borrowernumber = ?");
-$sthtemp->execute($loggedinuser);
-my ( $flags, $homebranch ) = $sthtemp->fetchrow;
+my ($flags, $homebranch) = GetFlagsAndBranchFromBorrower($loggedinuser);
 
 if ( $count == 1 ) {
     my $sth;
 
-    my $branches = getbranches;
+    my $branches = GetBranches;
     my @branchloop;
     foreach my $thisbranch ( sort keys %$branches ) {
         my %row = (




reply via email to

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