|
Lines 352-359
sub fine_items {
Link Here
|
| 352 |
} |
352 |
} |
| 353 |
); |
353 |
); |
| 354 |
|
354 |
|
|
|
355 |
# start and end are specified as a 1-based indices |
| 356 |
# convert them to standard half open array start and terminate values |
| 355 |
$start = $start ? $start - 1 : 0; |
357 |
$start = $start ? $start - 1 : 0; |
| 356 |
$end = $end ? $end : scalar @fees - 1; |
358 |
$end = $end ? $end : scalar @fees; |
| 357 |
|
359 |
|
| 358 |
my $av_field_template = $server ? $server->{account}->{av_field_template} : undef; |
360 |
my $av_field_template = $server ? $server->{account}->{av_field_template} : undef; |
| 359 |
$av_field_template ||= "[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"; |
361 |
$av_field_template ||= "[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"; |
|
Lines 361-372
sub fine_items {
Link Here
|
| 361 |
my $tt = Template->new(); |
363 |
my $tt = Template->new(); |
| 362 |
|
364 |
|
| 363 |
my @return_values; |
365 |
my @return_values; |
| 364 |
for ( my $i = $start; $i <= $end; $i++ ) { |
366 |
for ( my $i = $start; $i < $end; $i++ ) { |
| 365 |
my $fee = $fees[$i]; |
367 |
my $fee = $fees[$i]; |
| 366 |
|
368 |
|
| 367 |
my $output; |
369 |
my $output; |
| 368 |
$tt->process( \$av_field_template, { accountline => $fee }, \$output ); |
370 |
$tt->process( \$av_field_template, { accountline => $fee }, \$output ); |
| 369 |
push( @return_values, { barcode => $output } ); |
371 |
push @return_values, { barcode => $output }; |
| 370 |
} |
372 |
} |
| 371 |
|
373 |
|
| 372 |
return \@return_values; |
374 |
return \@return_values; |
| 373 |
- |
|
|