Hi, All,
I am trying to calculate the total quantity on the delivery note , however, its not working
to show the total , but just on the customer field
- Custom field on delivery note ‘total_quanity’
- Create custom scripts Setup>custom script>Delivery Note>
frappe.ui.form.on(“Delivery Note”, {
validate: function(frm) {
total_qty = 0;
$.each(frm.doc.items || [], function(i, d) {
total_qty += flt(d.qty);
});
frm.set_value(“total_quantity”, total_qty);
}
});
Then i reload and look at my delivery note and its not working, may anyone help to advise
me what’s wrong and how to fix it ?