From a72ea30bd8204fe4778030beecacf1f34cb811ea Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 19 Sep 2012 18:42:14 +0800 Subject: [PATCH] Bug 8788 - Viewing basket for acquisitions triggers error log entries. Content-Type: text/plain; charset="utf-8" By moving total_rrp_gste, total_est_gste, gist_rrp, and gist_est to a secondary $template->param() call conditionally on "if $gist;" prevents error log entries, and can be done since these variables are only used if GST ($gist) in the template. --- acqui/basket.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index a707a82..b72f913 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -369,10 +369,6 @@ my $total_est_gste; entrydate => C4::Dates->new($results[0]->{'entrydate'},'iso')->output, books_loop => \@books_loop, gist_rate => sprintf( "%.2f", $gist * 100 ) . '%', - total_rrp_gste => sprintf( "%.2f", $total_rrp_gste ), - total_est_gste => sprintf( "%.2f", $total_est_gste ), - gist_est => sprintf( "%.2f", $gist_est ), - gist_rrp => sprintf( "%.2f", $gist_rrp ), total_rrp_gsti => sprintf( "%.2f", $total_rrp_gsti ), total_est_gsti => sprintf( "%.2f", $total_est_gsti ), # currency => $bookseller->{'listprice'}, @@ -384,6 +380,12 @@ my $total_est_gste; unclosable => @orders ? 0 : 1, has_budgets => $has_budgets, ); + $template->param( + total_rrp_gste => sprintf( "%.2f", $total_rrp_gste ), + total_est_gste => sprintf( "%.2f", $total_est_gste ), + gist_est => sprintf( "%.2f", $gist_est ), + gist_rrp => sprintf( "%.2f", $gist_rrp ), + ) if $gist; } output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.9.5