Bugzilla – Attachment 12338 Details for
Bug 8788
Viewing basket for acquisitions triggers error log entries.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Added conditional secondary template param call (3.6.x)
0001-Bug-8788-Viewing-basket-for-acquisitions-triggers-er.patch (text/plain), 1.95 KB, created by
Mark Tompsett
on 2012-09-19 11:03:58 UTC
(
hide
)
Description:
Added conditional secondary template param call (3.6.x)
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2012-09-19 11:03:58 UTC
Size:
1.95 KB
patch
obsolete
>From a72ea30bd8204fe4778030beecacf1f34cb811ea Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8788
: 12338 |
12339