Bug 17128: Make summary-print.pl plack safe

$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 <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-08-15 15:45:38 +01:00 committed by Kyle M Hall
parent 762415a2ff
commit 2cf1e97e5c
1 changed files with 3 additions and 2 deletions

View File

@ -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 = [];