From f941988e0535ee47cd2b3b11ed7fa9d404a05a8b Mon Sep 17 00:00:00 2001 From: rangi Date: Mon, 12 Mar 2001 23:32:47 +0000 Subject: [PATCH] Glens updates to automatically increment barcode, and to remove hardcoded itemtypes in scripts --- acqui/acquire.pl | 52 ++++++++++++++++++++++++++++++++++++++++------ acqui/newbiblio.pl | 43 +++++++++++++++++++++++++++++++++++--- 2 files changed, 86 insertions(+), 9 deletions(-) diff --git a/acqui/acquire.pl b/acqui/acquire.pl index 73fc04ec51..28a1cae7d2 100755 --- a/acqui/acquire.pl +++ b/acqui/acquire.pl @@ -5,7 +5,8 @@ use C4::Acquisitions; use C4::Output; - +use C4::Database; +use C4::Search; use CGI; use strict; @@ -59,7 +60,7 @@ EOP if ($catview ne 'yes'){ print ""; } else { - print "{'ordernumber'}&id=$results[0]->{'booksellerid'}>"; + print "{'ordernumber'}&id=$results[0]->{'booksellerid'}>"; } print <$results[0]->{'ordernumber'} - Receive Order
@@ -87,8 +88,28 @@ Shopping Basket For: $booksellers[0]->{'name'} -Format * - +Format + + +prepare($query); + $sth->execute; + my $data=$sth->fetchrow_hashref; + print $data->{'barcode'}+1; + $sth->finish; + $dbh->disconnect; +} + +print < @@ -200,7 +238,9 @@ Budgeted Cost Invoice Number $invoice - + + + Notes diff --git a/acqui/newbiblio.pl b/acqui/newbiblio.pl index 0d11d5fecf..4b714bc108 100755 --- a/acqui/newbiblio.pl +++ b/acqui/newbiblio.pl @@ -6,6 +6,7 @@ use C4::Acquisitions; use C4::Output; use C4::Search; +use C4::Database; use CGI; use strict; @@ -148,8 +149,27 @@ Shopping Basket For: $booksellers[0]->{'name'} -Format * -{'itemtype'}> +Format + + +prepare($query); + $sth->execute; + my $data=$sth->fetchrow_hashref; + print $data->{'barcode'}+1; + $sth->finish; + $dbh->disconnect; +} + +print < -- 2.39.5