Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cur_frm.cscript.custom_validate = function(doc) {
- $.each(wn.model.get("Sales Order Item", {parent:doc.name}), function(i, d) {
- if(d.amount <= 0) {
- var msg = "Please enter a value for X for item " + d.item_code;
- msgprint(msg);
- throw msg;
- // or use wn.throw(msg) to do both msgprint and throw in one go, if it is available in your version
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement