Bugzilla – Attachment 140811 Details for
Bug 22115
Table of checkouts doesn't respect CurrencyFormat setting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting
Bug-22115-Format-prices-in-table-of-checkouts-acco.patch (text/plain), 3.72 KB, created by
David Nind
on 2022-09-20 22:45:51 UTC
(
hide
)
Description:
Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-09-20 22:45:51 UTC
Size:
3.72 KB
patch
obsolete
>From 6a95d44d9c7ed0d0c93414844f9472614aefea61 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Tue, 20 Sep 2022 21:20:57 +0000 >Subject: [PATCH] Bug 22115: Format prices in table of checkouts according to > CurrencyFormat setting > >In the patron account in the staff interface, all amounts in the >checkouts table should be formatted according to the CurrencyFormat >system preference setting. > >To test: >* Edit some items, setting the replacement cost >* Make sure one of the item type is set to charge a rental charge >* Check out items >* Verify the checkouts table displays on both checkouts and details > tabs correctly >* Try different settings of CurrencyFormat and verify all amounts > display correctly > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/includes/checkouts-table.inc | 1 + > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 12 ++++++------ > 2 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >index c74be444ac..ab75568e52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -1,5 +1,6 @@ > [% USE Koha %] > [% PROCESS 'modal-claims.inc' %] >+[% INCLUDE 'format_price.inc' %] > <div id="checkouts"> > [% IF ( issuecount ) %] > <div id="issues-table-loading-message"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 0afb4514f0..8af8dff9f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -437,19 +437,19 @@ $(document).ready(function() { > { > "mDataProp": function ( oObj ) { > if ( ! oObj.charge ) oObj.charge = 0; >- return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).toFixed(2) + '<span>'; >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).format_price() + '<span>'; > } > }, > { > "mDataProp": function ( oObj ) { > if ( ! oObj.fine ) oObj.fine = 0; >- return '<span style="text-align: right; display: block;">' + parseFloat(oObj.fine).toFixed(2) + '<span>'; >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.fine).format_price() + '<span>'; > } > }, > { > "mDataProp": function ( oObj ) { > if ( ! oObj.price ) oObj.price = 0; >- return '<span style="text-align: right; display: block;">' + parseFloat(oObj.price).toFixed(2) + '<span>'; >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.price).format_price() + '<span>'; > } > }, > { >@@ -645,9 +645,9 @@ $(document).ready(function() { > total_fine += aaData[i]['fine'] * 1; > total_price += aaData[i]['price'] * 1; > } >- $("#totaldue").html(total_charge.toFixed(2)); >- $("#totalfine").html(total_fine.toFixed(2)); >- $("#totalprice").html(total_price.toFixed(2)); >+ $("#totaldue").html(total_charge.format_price() ); >+ $("#totalfine").html(total_fine.format_price() ); >+ $("#totalprice").html(total_price.format_price() ); > }, > "bPaginate": false, > "bProcessing": true, >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22115
:
140807
|
140811
|
141256
|
141257