0

I am trying to calculate total in my JavaScript calculation. Division, subtraction, and multiplication all are going good, but when I try to add values, it does not work. Here is my JavaScript code

function Calc(v) {
  /*Detail Calculation Each Row*/
  var index = $(v).parent().parent().index();

  var qqq1 = document.getElementsByName("qty[]")[index].value;
  var rrr1 = document.getElementsByName("price1[]")[index].value;
  var ddd1 = document.getElementsByName("discunt[]")[index].value;
  var tot4 = (qqq1) + (rrr1 - ddd1)

  document.getElementsByName("tot4[]")[index].value = tot4;

  GetTotal();
Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122

0 Answers0