[Vuejs]-Calculate GrandTotal in VueJS2

0👍

You are not using, any values from this.form.items array.
Change your return statement to,
simply get the value of variable s inside the reduce method

return  this.form.items.reduce((total, item) => {
      let s = (item.unit_price - (item.unit_price * item.discount / 100)) * item.quantity;
      return total + s;
}, 0);


Leave a comment