[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/acqui newbiblio.pl
From: |
Mason James |
Subject: |
[Koha-cvs] koha/acqui newbiblio.pl |
Date: |
Wed, 07 Jun 2006 04:29:10 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Mason James <sushi> 06/06/07 04:29:10
Modified files:
acqui : newbiblio.pl
Log message:
Merging Katipo changes.
Fix for bug 3589, can now order and receive donations in one go.
Also a fix to allow user to create a new item, attached to an exisiting
bibitem.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui/newbiblio.pl?cvsroot=koha&r1=1.31&r2=1.32
Patches:
Index: newbiblio.pl
===================================================================
RCS file: /sources/koha/koha/acqui/newbiblio.pl,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- newbiblio.pl 7 Jun 2006 04:01:00 -0000 1.31
+++ newbiblio.pl 7 Jun 2006 04:29:10 -0000 1.32
@@ -46,6 +46,7 @@
my $biblio = $input->param('biblio');
my $basketno = $input->param('basketno');
my $suggestionid = $input->param('suggestionid');
+my $donation = $input->param('donation');
my $close = $input->param('close');
my $data;
my $new;
@@ -78,7 +79,12 @@
else { #modify order
$data = getsingleorder($ordnum);
$biblio = $data->{'biblionumber'};
+ #get basketno and suppleirno. too!
+ my $data2 = getbasket( $data->{'basketno'} );
+ $basketno = $data2->{'basketno'};
+ $booksellerid = $data2->{'booksellerid'};
}
+
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => "acqui/newbiblio.tmpl",
@@ -182,6 +188,29 @@
$template->param( sort2 => $data->{'sort2'} );
}
+my $bibitemsexists;
+
+#do a biblioitems lookup on bib
+( my $bibitemscount, my @bibitems ) = getbiblioitembybiblionumber($biblio);
+if ( $bibitemscount > 0 ) {
+ # warn "NEWBIBLIO: bibitems for $biblio exists\n";
+ # warn Dumper $bibitemscount, @bibitems;
+ $bibitemsexists = 1;
+
+ my @bibitemloop;
+ for ( my $i = 0 ; $i < $bibitemscount ; $i++ ) {
+ my %line;
+ $line{biblioitemnumber} = $bibitems[$i]->{'biblioitemnumber'};
+ $line{isbn} = $bibitems[$i]->{'isbn'};
+ $line{itemtype} = $bibitems[$i]->{'itemtype'};
+ $line{volumeddesc} = $bibitems[$i]->{'volumeddesc'};
+ push( @bibitemloop, \%line );
+
+ $template->param( bibitemloop => address@hidden );
+ }
+ $template->param( bibitemexists => "1" );
+}
+
# fill template
$template->param(
close => $close,
@@ -225,7 +254,8 @@
invoice => $data->{'booksellerinvoicenumber'},
ecost => $data->{'ecost'},
notes => $data->{'notes'},
- publishercode => $data->{'publishercode'}
+ publishercode => $data->{'publishercode'},
+ donation => $donation
);
output_html_with_http_headers $input, $cookie, $template->output;