Skip to content

Instantly share code, notes, and snippets.

Created July 6, 2014 07:01
What would you like to do?
Calcualate Total Quantity: ERPNext Custom Script Example
cur_frm.cscript.custom_validate = function() {
var sum = 0;
$.each(doc.entries, function(i, d) { sum += d.qty });
cur_frm.set_value(doc, "total_qty", sum);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment