@@ -, +, @@ non-existant accountlines --- C4/SIP/ILS/Patron.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/C4/SIP/ILS/Patron.pm +++ a/C4/SIP/ILS/Patron.pm @@ -377,7 +377,7 @@ sub fine_items { ); $start = $start ? $start - 1 : 0; - $end = $end ? $end : scalar @fees - 1; + $end = $end ? $end - 1 : scalar @fees - 1; my $av_field_template = $server ? $server->{account}->{av_field_template} : undef; $av_field_template ||= "[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"; @@ -388,6 +388,8 @@ sub fine_items { for ( my $i = $start; $i <= $end; $i++ ) { my $fee = $fees[$i]; + next unless $fee; + my $output; $tt->process( \$av_field_template, { accountline => $fee }, \$output ); push( @return_values, { barcode => $output } ); --