koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/acqui acquire.pl finishreceive.pl newbibli... [rel_2_2]


From: Ryan Higgins
Subject: [Koha-cvs] koha/acqui acquire.pl finishreceive.pl newbibli... [rel_2_2]
Date: Sun, 15 Jul 2007 16:46:25 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Ryan Higgins <rych>     07/07/15 16:46:25

Modified files:
        acqui          : acquire.pl finishreceive.pl newbiblio.pl 

Log message:
        adding multiple item add

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acquire.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.18.2.6&r2=1.18.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/finishreceive.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.17.2.1&r2=1.17.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/newbiblio.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.21.2.8&r2=1.21.2.9

Patches:
Index: acquire.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/acquire.pl,v
retrieving revision 1.18.2.6
retrieving revision 1.18.2.7
diff -u -b -r1.18.2.6 -r1.18.2.7
--- acquire.pl  25 Jul 2006 12:27:55 -0000      1.18.2.6
+++ acquire.pl  15 Jul 2007 16:46:25 -0000      1.18.2.7
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: acquire.pl,v 1.18.2.6 2006/07/25 12:27:55 tipaul Exp $
+# $Id: acquire.pl,v 1.18.2.7 2007/07/15 16:46:25 rych Exp $
 
 #script to recieve orders
 #written by address@hidden 24/2/2000
@@ -25,6 +25,7 @@
 use strict;
 use CGI;
 use C4::Context;
+use C4::Koha;
 use C4::Acquisition;
 use C4::Biblio;
 use C4::Output;
@@ -63,25 +64,19 @@
 $template->param($count);
 if ($count == 1){
        my $sth;
-#      my $sth=$dbh->prepare("Select itemtype,description from itemtypes order 
by description");
-#      $sth->execute;
-#      my  @itemtype;
-#      my %itemtypes;
-#      push @itemtype, "";
-#      $itemtypes{''} = "Please choose";
-#      while (my ($value,$lib) = $sth->fetchrow_array) {
-#              push @itemtype, $value;
-#              $itemtypes{$value}=$lib;
-#      }
-# 
-#      my $CGIitemtype=CGI::scrolling_list( -name     => 'format',
-#                              -values   => address@hidden,
-#                              -default  => $results[0]->{'itemtype'},
-#                              -labels   => \%itemtypes,
-#                              -size     => 1,
-#                              -tabindex=>'',
-#                              -multiple => 0 );
-#      $sth->finish;
+
+       my $locations = getKohaAuthorisedValues($dbh, 'items.location');
+       if ($locations ) {
+               my @location_codes = sort keys %$locations;
+               my $CGIlocation=CGI::scrolling_list( -name     => 'location',
+                               -values   => address@hidden,
+                               -default  => $results[0]->{'itemtype'},
+                               -labels   => $locations,
+                               -size     => 1,
+                               -tabindex=>'',
+                               -multiple => 0 );
+               $template->param(  CGIlocation => $CGIlocation );
+       }
 
        my @branches;
        my @select_branch;
@@ -99,6 +94,7 @@
                                -tabindex=>'',
                                -multiple => 0 );
 
+
        my $auto_barcode = C4::Context->boolean_preference("autoBarcode") || 0;
                # See whether barcodes should be automatically allocated.
                # Defaults to 0, meaning "no".
@@ -154,6 +150,7 @@
                barcode => $barcode,
                bookfund => $results[0]->{'bookfundid'},
                quantity => $results[0]->{'quantity'},
+               quantityreceivedplus1 => $results[0]->{'quantityreceived'} + 1,
                quantityreceived => $results[0]->{'quantityreceived'},
                rrp => $results[0]->{'rrp'},
                ecost => $results[0]->{'ecost'},

Index: finishreceive.pl
===================================================================
RCS file: /sources/koha/koha/acqui/finishreceive.pl,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -u -b -r1.17.2.1 -r1.17.2.2
--- finishreceive.pl    25 Jul 2006 12:27:55 -0000      1.17.2.1
+++ finishreceive.pl    15 Jul 2007 16:46:25 -0000      1.17.2.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,30 @@
     # 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;
+
+       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],
+                                                       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;

Index: newbiblio.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/newbiblio.pl,v
retrieving revision 1.21.2.8
retrieving revision 1.21.2.9
diff -u -b -r1.21.2.8 -r1.21.2.9
--- newbiblio.pl        13 Sep 2006 18:28:12 -0000      1.21.2.8
+++ newbiblio.pl        15 Jul 2007 16:46:25 -0000      1.21.2.9
@@ -164,7 +164,6 @@
 } else {
        $template->param( sort2 => $data->{'sort2'});
 }
-
 # fill template
 $template->param( close=> $close, bookfundid=>$bookfundid, 
bookfundname=>$bookfundname) if ($close);
 
@@ -181,7 +180,7 @@
                                                discount => 
$booksellers[0]->{'discount'},
                                                listincgst => 
$booksellers[0]->{'listincgst'},
                                                listprice => 
$booksellers[0]->{'listprice'},
-                                               gstreg => 
$booksellers[0]->{'gstreg'},
+                                               gstreg => 
$booksellers[0]->{'gstreg'} || '0',
                                                invoiceinc => 
$booksellers[0]->{'invoiceincgst'},
                                                invoicedisc => 
$booksellers[0]->{'invoicedisc'},
                                                nocalc => 
$booksellers[0]->{'nocalc'},




reply via email to

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