From 05e5034932dd596bca07da548778bdb67c02c20c Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 7 Mar 2003 16:34:04 +0000 Subject: [PATCH] bugfixes + adding buttons to switch between normal and MARC view of a record --- acqui.simple/addbiblio.pl | 8 +++++++- acqui.simple/additem.pl | 5 ++++- acqui/acquire.pl | 2 -- acqui/finishreceive.pl | 14 +++++++------- acqui/receive.pl | 1 + 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/acqui.simple/addbiblio.pl b/acqui.simple/addbiblio.pl index de607b8646..3f694fa99d 100755 --- a/acqui.simple/addbiblio.pl +++ b/acqui.simple/addbiblio.pl @@ -49,8 +49,13 @@ sub find_value { my ($tagfield,$insubfield,$record) = @_; my $result; my $indicator; + warn "tagfield : $tagfield /".$record->as_formatted; if ($tagfield <10) { - $result = $record->field($tagfield)->data(); + if ($record->field($tagfield)) { + $result = $record->field($tagfield)->data(); + } else { + $result=""; + } } else { foreach my $field ($record->field($tagfield)) { my @subfields = $field->subfields(); @@ -83,6 +88,7 @@ sub MARCfindbreeding { my ($file,$marc) = $sth->fetchrow; if ($marc) { my $record = MARC::File::USMARC::decode($marc); + warn "==> ".$record->as_formatted(); if (ref($record) eq undef) { return -1; } else { diff --git a/acqui.simple/additem.pl b/acqui.simple/additem.pl index 59fc93f68f..343867f217 100755 --- a/acqui.simple/additem.pl +++ b/acqui.simple/additem.pl @@ -47,10 +47,12 @@ sub find_value { return($indicator,$result); } my $input = new CGI; +my $dbh = C4::Context->dbh; my $error = $input->param('error'); my $bibid = $input->param('bibid'); +my $oldbiblionumber = &MARCfind_oldbiblionumber_from_MARCbibid($dbh,$bibid); + my $op = $input->param('op'); -my $dbh = C4::Context->dbh; my $itemnum = $input->param('itemnum'); my $tagslib = &MARCgettagslib($dbh,1); @@ -245,6 +247,7 @@ my ($template, $loggedinuser, $cookie) $template->param(item_loop => \@item_value_loop, item_header_loop => \@header_value_loop, bibid => $bibid, + biblionumber =>$oldbiblionumber, item => \@loop_data, itemnum => $itemnum, itemtagfield => $itemtagfield, diff --git a/acqui/acquire.pl b/acqui/acquire.pl index 4ca58aa5a4..875729b286 100755 --- a/acqui/acquire.pl +++ b/acqui/acquire.pl @@ -30,8 +30,6 @@ use C4::Biblio; use C4::Output; use C4::Search; use C4::Auth; -use C4::Biblio; -use C4::Output; use C4::Interface::CGI::Output; use C4::Database; use HTML::Template; diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 41b28bce2f..be0a4c70bc 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -104,13 +104,13 @@ if ($quantity != 0){ size => $size?$size:"" }); my $barcode=$input->param('barcode'); my @barcodes; - if ($barcode =~ /\,/){ - @barcodes=split(/\,/,$barcode); - }elsif ($barcode =~ /\|/){ - @barcodes=split(/\|/,$barcode); - } else { - $barcodes[0]=$barcode; - } +# if ($barcode =~ /\,/){ + @barcodes=split(/\,| |\|/,$barcode); +# }elsif ($barcode =~ /\|/){ +# @barcodes=split(/\|/,$barcode); +# } else { +# $barcodes[0]=$barcode; +# } my ($error) = newitems({ biblioitemnumber => $bibitemno, biblionumber => $biblionumber, replacementprice => $replacement, diff --git a/acqui/receive.pl b/acqui/receive.pl index 87f4fb9e03..8cf93e9731 100755 --- a/acqui/receive.pl +++ b/acqui/receive.pl @@ -85,6 +85,7 @@ for (my$i=0;$i<$count;$i++){ $line{unitprice} = $results[$i]->{'unitprice'}; $line{quantityrecieved} = $results[$i]->{'quantityreceived'}; $line{total} = $total; + $line{id} = $id; push @loop_orders, \%line; $totalprice+=$results[$i]->{'unitprice'}; $totalfreight+=$results[$i]->{'freight'}; -- 2.39.5