Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
Marc 6359922847 Bug 17076 - Format fines in patron search results table
Format the values in patron search results following syspref CurrencyFormat.

To verify:
- Search for patrons who have fines or credits
- In result table, column 'Fines' does not respect syspref CurrencyFormat
  (e.g. for FR)

To test:
- Apply patch
- Repeat steps above, verify that fines display as appropriate
- Change syspref Currencyformat, verify display

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-08-10 14:05:48 +00:00

48 lines
2.9 KiB
Text

[% USE To %]
[% USE AuthorisedValues %]
[% USE KohaDates %]
[% USE Price %]
{
"sEcho": [% sEcho %],
"iTotalRecords": [% iTotalRecords %],
"iTotalDisplayRecords": [% iTotalDisplayRecords %],
"aaData": [
[% FOREACH data IN aaData %]
{
[% IF CAN_user_tools_manage_patron_lists %]
"dt_borrowernumber":
"<input type='checkbox' class='selection' name='borrowernumber' value='[% data.borrowernumber %]' />",
[% END %]
"dt_cardnumber":
"[% data.cardnumber | html %]",
"dt_name":
"<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) invert_name = 1 %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</a>[% END %]</span>",
"dt_dateofbirth":
"[% data.dateofbirth | $KohaDates %]",
"dt_category":
"[% data.category_description |html %] ([% data.category_type |html %])",
"dt_branch":
"[% data.branchname |html %]",
"dt_dateexpiry":
"[% data.dateexpiry %]",
"dt_od_checkouts":
"[% IF data.overdues %]<span class='overdue'><strong>[% data.overdues %]</strong></span>[% ELSE %][% data.overdues %][% END %] / [% data.issues %]",
"dt_fines":
"<span style='text-align: right; display: block;'>[% IF data.fines < 0 %]<span class='credit'>[% data.fines | $Price %]</span> [% ELSIF data.fines > 0 %] <span class='debit'><strong>[% data.fines | $Price %]</strong></span> [% ELSE %] [% data.fines | $Price %] [% END %]</span>",
"dt_borrowernotes":
"[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]",
"dt_action":
"<a href='/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% data.borrowernumber %]' class='btn btn-mini'><i class='fa fa-pencil'></i> Edit</a>",
"borrowernumber":
"[% data.borrowernumber %]"
}[% UNLESS loop.last %],[% END %]
[% END %]
]
}
[% BLOCK escape_address %]
[%~ SET address = data.streetnumber _ ' ' %]
[%~ IF data.streettype %][% address = address _ AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) _ ' ' %][% END %]
[%~ IF data.address %][% address = address _ data.address _ ' ' %][% END %]
[%~ IF data.address2 %][% address = address _ data.address2 _ ' ' %][% END %]
[%~ To.json( address ) ~%]
[% END %]