From a07df4bdb0692fc289d2b89e8e1a634bddb5153d Mon Sep 17 00:00:00 2001 From: rahul Date: Wed, 20 Sep 2017 21:38:34 +0530 Subject: [PATCH] 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 --- app/assets/javascripts/osem-tickets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/osem-tickets.js b/app/assets/javascripts/osem-tickets.js index 3c915f03..51881055 100644 --- a/app/assets/javascripts/osem-tickets.js +++ b/app/assets/javascripts/osem-tickets.js @@ -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;