From 73b7039c41a286a49221ae369ff26cc882f10d9d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Aug 2016 15:45:38 +0100 Subject: [PATCH] [PASSED QA] Bug 17128: Make summary-print.pl plack safe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $borrowernumber is used in build_issue_data but not correctly defined (Variable "$borrowernumber" is not available) That may cause wrong charge displayed in the summary slip. Test plan: - Set rental charge for an item type - Define a rental discount for that item type in the circ rules - check in an item matching this rule Without this patch the charge displayed in the summary slip won't be calculated with the discount With this patch applied, the warning in the logs will no longer appear and the values will be correctly calculated. Signed-off-by: Marc VĂ©ron Signed-off-by: Katrin Fischer --- members/summary-print.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/members/summary-print.pl b/members/summary-print.pl index 82b1ca2..14df30f 100755 --- a/members/summary-print.pl +++ b/members/summary-print.pl @@ -67,7 +67,7 @@ $template->param( accounts => $accts, totaldue => $total, - issues => build_issue_data( GetPendingIssues($borrowernumber) ), + issues => build_issue_data( $borrowernumber ), totalprice => $totalprice, reserves => build_reserve_data( $holds_rs ), @@ -76,7 +76,8 @@ $template->param( output_html_with_http_headers $input, $cookie, $template->output; sub build_issue_data { - my $issues = shift; + my ( $borrowernumber ) = @_; + my $issues = GetPendingIssues( $borrowernumber ); my $return = []; -- 2.7.4