Bugzilla – Attachment 154780 Details for
Bug 32595
Price format cost in ILL requests table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32595: Add price formatting to cost and price paid fields in ILL list table
Bug-32595-Add-price-formatting-to-cost-and-price-p.patch (text/plain), 1.81 KB, created by
Pedro Amorim
on 2023-08-25 08:42:40 UTC
(
hide
)
Description:
Bug 32595: Add price formatting to cost and price paid fields in ILL list table
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-08-25 08:42:40 UTC
Size:
1.81 KB
patch
obsolete
>From d302387e87c8e05dec2042ffb480218081d74be0 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 23 Aug 2023 16:53:31 +0000 >Subject: [PATCH] Bug 32595: Add price formatting to cost and price paid fields > in ILL list table > >Test plan: >1) Enable ILLmodule and install FreeForm, run: > bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) Create a new FreeForm request and edit its price on the manage page > to something like '123' >3) Check back the ILL list table and confirm its shows as '123' >4) Apply patch >5) Verify the table again, see that it now shows as '123.00' > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 801143cf57..ef6487e1ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -342,14 +342,16 @@ $(document).ready(function() { > "data": "cost", > "orderable": true, > "render": function(data, type, row, meta) { >- return escape_str(data); >+ let cost = Number(row.cost) || 0; >+ return cost.escapeHtml().format_price(); > } > }, > { > "data": "paid_price", > "orderable": true, > "render": function(data, type, row, meta) { >- return escape_str(data); >+ let paid_price = Number(row.paid_price) || 0; >+ return paid_price.escapeHtml().format_price(); > } > }, > { >-- >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 32595
:
154717
|
154731
|
154780
|
154787
|
154788
|
157622
|
157623