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> (cherry picked from commitdb467287d1) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> (cherry picked from commit3db9848f1a) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
parent
81438f8834
commit
2e87e5eedf
|
|
@ -1,5 +1,6 @@
|
|||
[% USE Koha %]
|
||||
[% USE KohaDates %]
|
||||
[% USE Price %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
|
|
@ -103,8 +104,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 %]">View item</a> [% END %][% account.title |html %]</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>
|
||||
[% IF ( reverse_col ) %]
|
||||
<td>
|
||||
[% IF ( account.payment ) %]
|
||||
|
|
@ -128,9 +129,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 %]
|
||||
[% IF ( reverse_col ) %]
|
||||
<td colspan="2"></td>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[% USE Koha %]
|
||||
[% USE AuthorisedValues %]
|
||||
[% USE Price %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %]</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
|
|
@ -18,7 +19,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();
|
||||
|
|
@ -86,7 +87,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>
|
||||
|
|
@ -144,15 +145,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 New Issue