some fixes for acquisition
authortipaul <tipaul>
Mon, 13 Sep 2004 15:17:48 +0000 (15:17 +0000)
committertipaul <tipaul>
Mon, 13 Sep 2004 15:17:48 +0000 (15:17 +0000)
acqui/acquire.pl
acqui/basket.pl
acqui/newbasket2.pl
acqui/order.pl
acqui/suggestion-select.pl

index 2b8b49d..d06d0cf 100755 (executable)
@@ -46,7 +46,7 @@ my $biblio=$input->param('biblio');
 my $catview=$input->param('catview');
 my $gst=$input->param('gst');
 my ($count,@results)=ordersearch($search,$supplierid,$biblio,$catview);
-warn "C:$count for ordersearch($search,$supplierid,$biblio,$catview);";
+warn "C:$count for ordersearch($search,$supplierid,$biblio,$catview);";
 my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
 my $date = $results[0]->{'entrydate'};
 
index 8bff880..bce4d50 100755 (executable)
@@ -50,7 +50,7 @@ my ($count,@results);
 my $basket = getbasket($basketno);
 # FIXME : the query->param('supplierid') below is probably useless. The bookseller is always known from the basket
 # if no booksellerid in parameter, get it from basket
-warn "=>".$basket->{booksellerid};
+warn "=>".$basket->{booksellerid};
 $booksellerid = $basket->{booksellerid} unless $booksellerid;
 my ($count2,@booksellers)=bookseller($booksellerid);
 
index 981bad2..7fc0cb0 100755 (executable)
@@ -62,7 +62,7 @@ if ($num eq ''){
   $num=10;
 }
 my $booksellerid=$input->param('booksellerid');
-my $basket=$input->param('basket');
+my $basketno=$input->param('basketno');
 my $sub=$input->param('sub');
 #print $sub;
 my ($count,@booksellers)=bookseller($booksellerid);
@@ -217,7 +217,7 @@ while ($i < $count2){
        $lineres{title2}=$title2;
        $lineres{copyright}=$result->{'copyrightdate'};
        $lineres{booksellerid}=$booksellerid;
-       $lineres{basket}=$basket;
+       $lineres{basketno}=$basketno;
        $lineres{sub}=$sub;
        $lineres{biblionumber}=$result->{biblionumber};
        $lineres{title}=$result->{title};
@@ -233,7 +233,7 @@ while ($i < $count2){
 $offset=$num+$offset;
 $template->param(      bookselname => $booksellers[0]->{'name'},
                                                                booksellerid => $booksellerid,
-                                                               basket => $basket,
+                                                               basketno => $basketno,
                                                                parsub => $sub,
                                                                count => $count,
                                                                offset2 =>$offset2,
@@ -242,7 +242,6 @@ $template->param(   bookselname => $booksellers[0]->{'name'},
                                                                num => $num,
                                                                offset => $offset,
                                                                type =>  $type,
-                                                               basket => $basket,
                                                                title => $title,
                                                                author => $author,
                                                                loopsearch =>\@loopsearch,
index 5931c62..c10711d 100755 (executable)
@@ -76,6 +76,8 @@ for (my $i=0; $i<$count; $i++) {
                $inner_line{basketno} =$orders->[$i2]->{'basketno'};
                $inner_line{total} =$orders->[$i2]->{'count(*)'};
                $inner_line{authorisedby} = $orders->[$i2]->{'authorisedby'};
+               $inner_line{surname} = $orders->[$i2]->{'firstname'};
+               $inner_line{firstname} = $orders->[$i2]->{'surname'};
                $inner_line{creationdate} = format_date($orders->[$i2]->{'creationdate'});
                $inner_line{closedate} = format_date($orders->[$i2]->{'closedate'});
                push @loop_basket, \%inner_line;
index a00a8ad..8eb405f 100755 (executable)
@@ -10,7 +10,7 @@ use C4::Suggestions;
 
 my $input = new CGI;
 
-my $basketid = $input->param('basket');
+my $basketno = $input->param('basketno');
 my $supplierid = $input->param('booksellerid');
 
 my $title = $input->param('title');
@@ -22,8 +22,8 @@ my $volumedesc = $input->param('volumedesc');
 my $publicationyear = $input->param('publicationyear');
 my $place = $input->param('place');
 my $isbn = $input->param('isbn');
-my $status = $input->param('status');
-my $suggestedbyme = $input->param('suggestedbyme');
+my $status = 'ACCEPTED';
+my $suggestedbyme = 1;
 my $op = $input->param('op');
 $op = 'else' unless $op;
 
@@ -43,7 +43,7 @@ $template->param(suggestions_loop => $suggestions_loop,
                                publishercode => $publishercode,
                                status => $status,
                                suggestedbyme => $suggestedbyme,
-                               basket => $basketid,
+                               basketno => $basketno,
                                supplierid => $supplierid,
                                "op_$op" => 1,
 );