Fix decimal numbers limit to 2

while calculating the row total, javascript was called and on some quantity, a number with a big decimal part was appearing.In this PR it is fixed
Fixes https://github.com/opensuse/osem/issues/1709
This commit is contained in:
rahul 2017-09-20 21:38:34 +05:30
parent 9eeb482190
commit a07df4bdb0

View file

@ -4,7 +4,7 @@ function update_price($this){
// Calculate price for row
var value = $this.val();
var price = $('#price_' + id).text();
$('#total_row_' + id).text(value * price);
$('#total_row_' + id).text((value * price).toFixed(2));
// Calculate total price
var total = 0;