Bugzilla – Attachment 128228 Details for
Bug 27801
Entering multiple lines of an item in Point of Sale can make the Collect Payment field off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27801: Fix javascript price calculations
Bug-27801-Fix-javascript-price-calculations.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2021-12-03 15:31:43 UTC
(
hide
)
Description:
Bug 27801: Fix javascript price calculations
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-12-03 15:31:43 UTC
Size:
1.51 KB
patch
obsolete
>From ee65cdf09590052c60d53f4fbcf0cb33b32c3b86 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 3 Dec 2021 15:29:00 +0000 >Subject: [PATCH] Bug 27801: Fix javascript price calculations > >This patch ensures we're formatting the price values consistently for >the table total and the amount to pay input field. > >Test plan >1) Add an item to charge at 0.10. >2) Add this same item 8 or 9 times (Do not use the 'quantity') >3) Note that the table total and the 'Amount paid' values do not match >4) Apply the patch and repeat the above steps.. the values should now > match. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index cab264b802..542245fac8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -341,8 +341,10 @@ > for ( var i=0 ; i<aData.length ; i++ ) > { > iTotalPrice += aData[i][3]*1; >+ console.log(iTotalPrice); > } >- nFoot.getElementsByTagName('td')[1].innerHTML = iTotalPrice.format_price(); >+ iTotalPrice = iTotalPrice.format_price(); >+ nFoot.getElementsByTagName('td')[1].innerHTML = iTotalPrice; > $('#paid').val(iTotalPrice); > $('#paid').trigger('change'); > }, >-- >2.20.1
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 27801
:
125287
|
128228
|
128229
|
128234
|
128358
|
128449