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> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
da4abc7a33
commit
ed2420273b
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue