title: JS: Getting "0" if input or formula result has decimal value
body: <p>I'm trying to create a virtual shop.</p>
  
  <p>Everything works fine unless the input values are decimal despite they're being declared as decimals, as you can see in the attached printscreens.</p>
  
  <p>How do I get past this?</p>
  
  <pre><code>var total = (parseInt($("#quantity").val()) * parseFloat($("#price").val())) +
                  (parseInt($("#quantity").val()) * parseFloat($("#price").val() * (parseFloat($("#IVA").val()) / 100)));
  
              $("#total").val(total);
  </code></pre>
  
  <pre><code>        public int ID { get; set; }
          public int OrderID { get; set; }
          public int ProductID { get; set; }
          public decimal Price { get; set; }
          public int Quantity { get; set; }
          public decimal IVA { get; set; }
          public decimal TotalPrice { get; set; }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/aj3ti.png" rel="nofollow noreferrer">https://i.stack.imgur.com/aj3ti.png</a></p>
  
  <p><a href="https://i.stack.imgur.com/fnJ1E.png" rel="nofollow noreferrer">https://i.stack.imgur.com/fnJ1E.png</a></p>