Lines 184-195
function updateCosts(){
Link Here
|
184 |
var gst_on=false; |
184 |
var gst_on=false; |
185 |
|
185 |
|
186 |
var rrp = new Number(listprice*exchangerate); |
186 |
var rrp = new Number(listprice*exchangerate); |
|
|
187 |
var rep = new Number(listprice*exchangerate); |
187 |
var ecost = rrp; |
188 |
var ecost = rrp; |
188 |
if ( 100-discount != 100 ) { //Prevent rounding issues if no discount |
189 |
if ( 100-discount != 100 ) { //Prevent rounding issues if no discount |
189 |
ecost = new Number(Math.floor(rrp * (100 - discount )) / 100); |
190 |
ecost = new Number(Math.floor(rrp * (100 - discount )) / 100); |
190 |
} |
191 |
} |
191 |
var total = new Number( ecost * quantity); |
192 |
var total = new Number( ecost * quantity); |
192 |
$("#rrp").val(rrp.toFixed(2)); |
193 |
$("#rrp").val(rrp.toFixed(2)); |
|
|
194 |
$("#replacementprice").val(rep.toFixed(2)); |
193 |
$("#ecost").val(ecost.toFixed(2)); |
195 |
$("#ecost").val(ecost.toFixed(2)); |
194 |
$("#total").val(total.toFixed(2)); |
196 |
$("#total").val(total.toFixed(2)); |
195 |
$("listprice").val(listprice.toFixed(2)); |
197 |
$("listprice").val(listprice.toFixed(2)); |
196 |
- |
|
|