From 0f95497ab8136c099137a5c414ff931bac3f236e Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Fri, 20 Jun 2008 15:19:15 -0500 Subject: [PATCH] Fix call to wrong API fcn resulting in missing Vendor information on two acq pages. Signed-off-by: Joshua Ferraro --- acqui/orderreceive.pl | 6 +++--- acqui/parcels.pl | 12 +++--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 5e86eb53d0..13a0e88472 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -83,7 +83,7 @@ my $gst = $input->param('gst'); my @results = SearchOrder( $search, $supplierid, $biblionumber, $catview ); my $count = scalar @results; -my @booksellers = GetBookSeller( $results[0]->{'booksellerid'} ); +my $bookseller = GetBookSellerFromId( $results[0]->{'booksellerid'} ); my $date = $results[0]->{'entrydate'}; @@ -177,7 +177,7 @@ if ( $count == 1 ) { freight => $freight, gst => $gst, catview => ( $catview ne 'yes' ? 1 : 0 ), - name => $booksellers[0]->{'name'}, + name => $bookseller->{'name'}, date => format_date($date), title => $results[0]->{'title'}, author => $results[0]->{'author'}, @@ -216,7 +216,7 @@ else { loop => \@loop, date => format_date($date), datereceived => $datereceived->output(), - name => $booksellers[0]->{'name'}, + name => $bookseller->{'name'}, supplierid => $supplierid, invoice => $invoice, ); diff --git a/acqui/parcels.pl b/acqui/parcels.pl index 213ba23f37..29d1cf2713 100755 --- a/acqui/parcels.pl +++ b/acqui/parcels.pl @@ -78,8 +78,6 @@ my $datefrom=$input->param('datefrom'); my $dateto=$input->param('dateto'); my $resultsperpage = $input->param('resultsperpage'); -my @booksellers=GetBookSeller($supplierid); -my $count = scalar @booksellers; my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "acqui/parcels.tmpl", @@ -91,9 +89,10 @@ my ($template, $loggedinuser, $cookie) }); +my $bookseller=GetBookSellerFromId($supplierid); $resultsperpage = 20 unless ($resultsperpage); my @results =GetParcels($supplierid, $order, $code,$datefrom,$dateto); -$count = scalar @results; +my $count = scalar @results; # multi page display gestion $startfrom=0 unless ($startfrom); @@ -136,11 +135,6 @@ my @loopres; my $hilighted=0; for (my $i=$startfrom;$i<=($startfrom+$resultsperpage-1<$count-1?$startfrom+$resultsperpage-1:$count-1);$i++){ -### startfrom: $startfrom -### resultsperpage: $resultsperpage -### count: $count -### code: $results[$i]->{booksellerinvoicenumber} -### datereceived: $results[$i]->{datereceived} my %cell; $cell{number}=$i+1; @@ -159,7 +153,7 @@ for (my $i=$startfrom;$i<=($startfrom+$resultsperpage-1<$count-1?$startfrom+$res $template->param(searchresults=>\@loopres, count=>$count) if ($count); $template->param(orderby=>$order, filter=>$code, datefrom=>$datefrom,dateto=>$dateto, resultsperpage=>$resultsperpage); $template->param( - name => $booksellers[0]->{'name'}, + name => $bookseller->{'name'}, DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), supplierid => $supplierid, GST => C4::Context->preference("gist"), -- 2.39.5