koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui finishreceive.pl [dev_week]


From: Ryan Higgins
Subject: [Koha-cvs] koha/acqui finishreceive.pl [dev_week]
Date: Mon, 01 Jan 2007 01:54:19 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Ryan Higgins <rych>     07/01/01 01:54:19

Modified files:
        acqui          : finishreceive.pl 

Log message:
        changing call to Biblio::newitems to allow creation of multiple items 
from acqui interface.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/finishreceive.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.17.4.1&r2=1.17.4.2

Patches:
Index: finishreceive.pl
===================================================================
RCS file: /sources/koha/koha/acqui/finishreceive.pl,v
retrieving revision 1.17.4.1
retrieving revision 1.17.4.2
diff -u -b -r1.17.4.1 -r1.17.4.2
--- finishreceive.pl    27 Jul 2006 15:41:16 -0000      1.17.4.1
+++ finishreceive.pl    1 Jan 2007 01:54:19 -0000       1.17.4.2
@@ -43,7 +43,8 @@
 my $gst=$input->param('gst');
 my $freight=$input->param('freight');
 my $supplierid = $input->param('supplierid');
-my $branch=$input->param('branch');
+
+
 
 # if ($quantrec != 0){
 #      $cost /= $quantrec;
@@ -53,16 +54,33 @@
     # save the quantity recieved.
     $datereceived = 
receiveorder($biblionumber,$ordnum,$quantrec,$user,$cost,$invoiceno,$datereceived,$freight,$replacement);
     # create items if the user has entered barcodes
-    my $barcode=$input->param('barcode');
-    my @barcodes=split(/\,| |\|/,$barcode);
-    my ($error) = newitems({ biblioitemnumber => $bibitemno,
+    my @barcode=$input->param('barcode');
+    my @itemcallnumber=$input->param('itemcallnumber');
+       my @branch=$input->param('branch');
+       my @itype                       = $input->param('itype');
+       my @location            = $input->param('location');
+       my $index = 0;
+       my @items;
+#FIXME -ASSUMES every item needs a barcode.
+
+       foreach my $barcode (@barcode) {
+               push @items, {          biblioitemnumber => $bibitemno,
                     biblionumber     => $biblionumber,
                     replacementprice => $replacement,
                     price            => $cost,
                     booksellerid     => $supplierid,
-                    homebranch       => $branch,
-                    loan             => 0 },
-                @barcodes);
+                               loan             => 0 ,
+                                       
+                                                       barcode                 
=>      $barcode[$index],       
+                               homebranch       => $branch[$index],
+                                                       itemcallnumber  =>  
$itemcallnumber[$index],
+                                                       itype                   
=> $itype[$index],      
+                                                       location                
=> $location[$index],
+                                       };
+               $index++;
+       }                               
+        my ($error) = newitems( address@hidden );
+
     print 
$input->redirect("/cgi-bin/koha/acqui/receive.pl?invoice=$invoiceno&supplierid=$supplierid&freight=$freight&gst=$gst&datereceived=$datereceived");
 } else {
     print $input->header;




reply via email to

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