Browse Source

Bug 22120: Add price formattig to patron summary print

The patron summary print lists the replacement prices
and rental charges of items and totals them. With this
patch they will be formatted according to the
CurrencyFormat system preference.

To test:
- Find or create a patron with some checkouts
- Make sure some items have replacement price set
  and some have a rental charge
- "Print summary" from the account in staff
- Verify that charges and prices in the checkouts
  table are formatted correctly
- Toggle CurrencyFormat to different settings

Signed-off-by: helene hickey <hickeyhe@wgc.school.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
19.05.x
Katrin Fischer 5 years ago
committed by root
parent
commit
3c2cc8da26
  1. 8
      koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt
  2. 2
      members/summary-print.pl

8
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt

@ -58,16 +58,16 @@
<td>[% issue.itemtype_description | html %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% issue.barcode | html %]</td>
<td>[% issue.charge | html %]</td>
<td>[% issue.replacementprice | html %]</td>
<td>[% issue.charge | $Price %]</td>
<td>[% issue.replacementprice | $Price %]</td>
<td>[% IF ( issue.overdue ) %]Overdue![% ELSE %]&nbsp;[% END %]</td>
</tr>
[% END %]
<tr>
<td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
<td>[% totaldue | html %]</td>
<td>[% totalprice | html %]</td>
<td>[% totaldue | $Price %]</td>
<td>[% totalprice | $Price %]</td>
<td colspan="3">&nbsp;</td>
</tr>
</table>

2
members/summary-print.pl

@ -96,7 +96,7 @@ sub build_issue_data {
$itemtype = Koha::ItemTypes->find( $itemtype );
$checkout->{itemtype_description} = $itemtype->description; #FIXME Should not it be translated_description
$checkout->{charge} = sprintf( "%.2f", $charge ); # TODO Should be done in the template using Price
$checkout->{charge} = $charge;
$checkout->{overdue} = $c->is_overdue;

Loading…
Cancel
Save