Bugzilla – Attachment 9218 Details for
Bug 7528
amount subtracting 1 cent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7528 - amount subtracting 1 cent
Bug-7528---amount-subtracting-1-cent.patch (text/plain), 1.14 KB, created by
Ian Walls
on 2012-04-16 15:37:39 UTC
(
hide
)
Description:
Bug 7528 - amount subtracting 1 cent
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2012-04-16 15:37:39 UTC
Size:
1.14 KB
patch
obsolete
>From f7219fe62ebe4aa0d6bfd9be28c7a151d3c6ea65 Mon Sep 17 00:00:00 2001 >From: mveron <veron@veron.ch> >Date: Sun, 15 Apr 2012 17:20:16 +0200 >Subject: [PATCH] Bug 7528 - amount subtracting 1 cent > >Rounding issue with JavaScript and float numbers, JavaScript changed to do no calculation if discount is 0 > >Signed-off-by: Ian Walls <koha.sekjal@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js >index b137f59..70e988e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js >@@ -664,7 +664,10 @@ function calcNeworderTotal(){ > > //do real stuff > var rrp = new Number(listprice*exchangerate); >- var ecost = new Number(Math.floor(rrp * (100 - discount ))/100); >+ var ecost = rrp; >+ if (100-discount != 100) { //Prevent rounding issues if no discount >+ ecost = new Number(Math.floor(rrp * (100 - discount ))/100); >+ } > var GST = new Number(0); > if (gst_on) { > rrp=rrp * (1+f.gstrate.value / 100); >-- >1.7.0.4
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 7528
:
9207
| 9218