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>
<td>[% issue.itemtype_description | html %]</td>
<td>[% issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% issue.barcode | html %]</td>
<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 %] [% END %]</td>
</tr>
[% END %]
<tr>
<td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
<td>[% IF ( issue.overdue ) %]Overdue![% ELSE %] [% 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"> </td>
</tr>
</table>
<td colspan="3"> </td>
</tr>
</table>
$itemtype = Koha::ItemTypes->find( $itemtype );
$checkout->{itemtype_description} = $itemtype->description; #FIXME Should not it be translated_description
$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;
$checkout->{overdue} = $c->is_overdue;