[Koha-cvs] koha/acqui acquire.pl [dev_week]
Ryan Higgins
rch at liblime.com
Mon Jan 1 02:45:40 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: dev_week
Changes by: Ryan Higgins <rych> 07/01/01 01:45:40
Modified files:
acqui : acquire.pl
Log message:
adding multiple new item adds for acqui.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/acquire.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.18.2.4.2.1&r2=1.18.2.4.2.2
Patches:
Index: acquire.pl
===================================================================
RCS file: /sources/koha/koha/acqui/Attic/acquire.pl,v
retrieving revision 1.18.2.4.2.1
retrieving revision 1.18.2.4.2.2
diff -u -b -r1.18.2.4.2.1 -r1.18.2.4.2.2
--- acquire.pl 27 Jul 2006 15:41:16 -0000 1.18.2.4.2.1
+++ acquire.pl 1 Jan 2007 01:45:40 -0000 1.18.2.4.2.2
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: acquire.pl,v 1.18.2.4.2.1 2006/07/27 15:41:16 kados Exp $
+# $Id: acquire.pl,v 1.18.2.4.2.2 2007/01/01 01:45:40 rych Exp $
#script to recieve orders
#written by chris at katipo.co.nz 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,41 @@
$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 => \@itemtype,
-# -default => $results[0]->{'itemtype'},
-# -labels => \%itemtypes,
-# -size => 1,
-# -tabindex=>'',
-# -multiple => 0 );
-# $sth->finish;
+ 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;
+ }
+ $sth->finish;
+
+ if ( C4::Context->preference('item-level_itypes')) {
+ my $CGIitemtype=CGI::scrolling_list( -name => 'itype',
+ -values => \@itemtype,
+ -default => $results[0]->{'itemtype'},
+ -labels => \%itemtypes,
+ -size => 1,
+ -tabindex=>'',
+ -multiple => 0 );
+ $template->param( CGIitype=> $CGIitemtype,);
+ }
+
+ my $locations = getKohaAuthorisedValues($dbh, 'items.location');
+ if ($locations ) {
+ my @location_codes = keys %$locations;
+ my $CGIlocation=CGI::scrolling_list( -name => 'location',
+ -values => \@location_codes,
+ -default => $results[0]->{'itemtype'},
+ -labels => $locations,
+ -size => 1,
+ -tabindex=>'',
+ -multiple => 0 );
+ $template->param( CGIlocation => $CGIlocation );
+ }
my @branches;
my @select_branch;
@@ -99,6 +116,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 +172,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'},
More information about the Koha-cvs
mailing list