Bug 18263: Make use of syspref 'CurrencyFormat' for Account and Pay fines tables
On Home > Patrons > Accounts for... and Home > Patrons > Pay fines for..., make the amounts display as defined in syspref 'CurrencyFormat' To test: - Apply patch - Give a patron a high fine or credit (e.g. 12345.67) - Got to pages Home > Patrons > Accounts for... and Home > Patrons > Pay fines - Verify that amounts display following syspref 'CurrencyFormat' (e.g. 12'345.67 for syspref set to 360'000.00 (CH) Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
9a4fd7b270
commit
db467287d1
2 changed files with 11 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
[% USE Koha %]
|
||||
[% USE KohaDates %]
|
||||
[% USE ColumnsSettings %]
|
||||
[% USE Price %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
|
@ -108,8 +109,8 @@ $(document).ready(function() {
|
|||
[%- IF account.description %], [% account.description %][% END %]
|
||||
[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">[% account.title |html %]</a>[% END %]</td>
|
||||
<td>[% account.note | html_line_break %]</td>
|
||||
[% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount %]</td>
|
||||
[% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding %]</td>
|
||||
[% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td>
|
||||
[% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td>
|
||||
<td class="actions">
|
||||
[% IF ( account.payment ) %]
|
||||
<a target="_blank" href="printfeercpt.pl?action=print&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print</a>
|
||||
|
@ -131,9 +132,9 @@ $(document).ready(function() {
|
|||
<tr>
|
||||
<td colspan="4">Total due</td>
|
||||
[% IF ( totalcredit ) %]
|
||||
<td class="credit" style="text-align: right;">[% total %]</td>
|
||||
<td class="credit" style="text-align: right;">[% total | $Price %]</td>
|
||||
[% ELSE %]
|
||||
<td class="debit"style="text-align: right;">[% total %]</td>
|
||||
<td class="debit"style="text-align: right;">[% total | $Price %]</td>
|
||||
[% END %]
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[% USE Koha %]
|
||||
[% USE AuthorisedValues %]
|
||||
[% USE Branches %]
|
||||
[% USE Price %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
|
@ -19,7 +20,7 @@ function enableCheckboxActions(){
|
|||
$(document).ready(function(){
|
||||
$('#pay-fines-form').preventDoubleFormSubmit();
|
||||
$("#woall").click(function(event){
|
||||
var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | format('%.2f') %]" );
|
||||
var msg = _("Are you sure you want to write off %s in outstanding fines? This cannot be undone!").format( "[% total | $Price %]" );
|
||||
var answer = confirm(msg);
|
||||
if (!answer){
|
||||
event.preventDefault();
|
||||
|
@ -87,7 +88,7 @@ function enableCheckboxActions(){
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td class="total" colspan="8">Total due:</td>
|
||||
<td style="text-align: right;">[% total | format('%.2f') %]</td>
|
||||
<td style="text-align: right;">[% total | $Price %]</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
@ -145,15 +146,15 @@ function enableCheckboxActions(){
|
|||
<td>[% line.accounttype %]</td>
|
||||
<td>[% line.notify_id %]</td>
|
||||
<td>[% line.notify_level %]</td>
|
||||
<td class="debit" style="text-align: right;">[% line.amount | format('%.2f') %]</td>
|
||||
<td class="debit" style="text-align: right;">[% line.amountoutstanding | format('%.2f') %]</td>
|
||||
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
|
||||
<td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% IF ( account_grp.total ) %]
|
||||
<tr>
|
||||
|
||||
<td class="total" colspan="8" style="text-align: right;">Sub total:</td>
|
||||
<td style="text-align: right;">[% account_grp.total | format('%.2f') %]</td>
|
||||
<td style="text-align: right;">[% account_grp.total | $Price %]</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue