koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui newbasket2.pl


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

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

Modified files:
        acqui          : newbasket2.pl 

Log message:
        POD added, Call to Bookseller.pm added. Some functions has been 
renamed/changed/rewrited...

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/newbasket2.pl?cvsroot=koha&r1=1.17&r2=1.18

Patches:
Index: newbasket2.pl
===================================================================
RCS file: /sources/koha/koha/acqui/newbasket2.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- newbasket2.pl       7 Jun 2006 03:55:54 -0000       1.17
+++ newbasket2.pl       31 Jul 2006 14:45:37 -0000      1.18
@@ -1,4 +1,5 @@
 #!/usr/bin/perl
+
 #origninally script to provide intranet (librarian) advanced search facility
 #now script to do searching for acquisitions
 
@@ -19,16 +20,58 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
+=head1 NAME
+
+newbasket2.pl
+
+=head1 DESCRIPTION
+this script allows to perform a new order from an existing record.
+
+=head1 CGI PARAMETERS
+
+=over 4
+
+=item search
+the title the librarian has typed to search an existing record.
+
+=item type
+To know if this script is called from intranet or from the opac.
+
+=item d
+the keyword the librarian has typed to search an existing record.
+
+=item author
+the author of the new record.
+
+=item offset
+
+=item num
+
+=item booksellerid
+the id of the bookseller this script has to add an order.
+
+=item basketno
+the basket number to know on which basket this script have to add a new order.
+
+=item sub
+FIXME : is this param still used ?
+
+=back
+
+=cut
+
+
 use strict;
 use C4::Search;
 use CGI;
 use C4::Output;
-use C4::Acquisition;
+use C4::Bookseller;
 use C4::Biblio;
 use HTML::Template;
 use C4::Auth;
 use C4::Interface::CGI::Output;
 
+
 #use Data::Dumper;
 
 my $env;
@@ -56,13 +99,15 @@
 
 my @results;
 my $offset = $input->param('offset');
-if ( $offset eq '' ) {
-    $offset = 0;
-}
+
+#default value for offset
+my $offset = 0 unless $offset;
+
 my $num = $input->param('num');
-if ( $num eq '' ) {
-    $num = 10;
-}
+
+#default value for num
+my $num = 10 unless $num;
+
 my $donation;
 my $booksellerid = $input->param('booksellerid');
 if ( $booksellerid == 72 ) {
@@ -72,7 +117,9 @@
 my $sub      = $input->param('sub');
 
 #print $sub;
-my ( $count, @booksellers ) = bookseller($booksellerid);
+my @booksellers = GetBookSeller($booksellerid);
+my $count = scalar @booksellers;
+
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
         template_name   => "acqui/newbasket2.tmpl",
@@ -230,9 +277,8 @@
     $lineres{'location-only'} = $location_only;
 
     # lets get a list on existing orders for all bibitems.
-    ( my $count1, my @bibitems ) =
-      getbiblioitembybiblionumber( $result->{biblionumber} );
-
+    my @bibitems = GetBiblioItemByBiblioNumber( $result->{biblionumber} );
+    my $count1 = scalar @bibitems; 
     my $order, my $ordernumber;
 
     my $i1 = 0;
@@ -241,7 +287,7 @@
     foreach my $bibitem (@bibitems) {
 
         ( $order, $ordernumber ) =
-          &getorder( $bibitem->{biblioitemnumber}, $result->{biblionumber} );
+          &GetOrder($result->{biblionumber},$bibitem->{biblioitemnumber} );
 
         #only show order if its current;
         my %order;




reply via email to

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