I manage to add in two more field into order line. When user click to change these fields, I need the system to auto calculate base on these two fields and update the quantity field. I am new to javascript, not able to get it work. Thank a lot.
All I know is the following code will update the field whenever user click on the numpad. But I am not manage to tweak it.
setValue: function(val) {
/*
var param = {};
param[this.numpadState.get('mode')] = val;
var order = this.shop.get('selectedOrder');
if (order.get('orderLines').length !== 0) {
order.selected.set(param);
} else {
this.shop.get('selectedOrder').destroy();
}
},