Created
July 6, 2014 07:01
-
-
Save rmehta/8f4aedb91a6c58dfa31e to your computer and use it in GitHub Desktop.
Calcualate Total Quantity: ERPNext Custom Script Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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