bugfixes + adding buttons to switch between normal and MARC view of a record
authortipaul <tipaul>
Fri, 7 Mar 2003 16:34:04 +0000 (16:34 +0000)
committertipaul <tipaul>
Fri, 7 Mar 2003 16:34:04 +0000 (16:34 +0000)
acqui.simple/addbiblio.pl
acqui.simple/additem.pl
acqui/acquire.pl
acqui/finishreceive.pl
acqui/receive.pl

index de607b8..3f694fa 100755 (executable)
@@ -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 {
index 59fc93f..343867f 100755 (executable)
@@ -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,
index 4ca58aa..875729b 100755 (executable)
@@ -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;
index 41b28bc..be0a4c7 100755 (executable)
@@ -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,
index 87f4fb9..8cf93e9 100755 (executable)
@@ -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'};