From 82b5f9083abdee4e954d0197a3c80621a0df9554 Mon Sep 17 00:00:00 2001 From: rahul Date: Mon, 18 Sep 2017 19:07:13 +0530 Subject: [PATCH] Fix total price for tickets While buying the ticket, user was only able to see the integer part in total.So in javascript parseInt was replaced with parseFloat to show the decimal part too Fixes https://github.com/openSUSE/osem/issues/1702 --- 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 ea99a349..3c915f03 100644 --- a/app/assets/javascripts/osem-tickets.js +++ b/app/assets/javascripts/osem-tickets.js @@ -9,7 +9,7 @@ function update_price($this){ // Calculate total price var total = 0; $('.total_row').each(function( index ) { - total += parseInt($(this).text()); + total += parseFloat($(this).text()); }); $('#total_price').text(total); }