Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // all STE receipts into WarehouseX require Material Request
- cur_frm.cscript.custom_validate = function(doc) {
- var details = wn.model.get("Stock Entry Detail", {parent: doc.name})
- var details_s_WarehouseX = wn.model.get("Stock Entry Detail", {parent:cur_frm.doc.name, s_warehouse:"WarehouseX"})
- var details_MR = $.map(item, function(d) { return d.material_request ? d : null })
- if(purpose=="Material Receipt" && details_s_WarehouseX.length && details.length > details_MR.length) {
- msgprint("You must receive against Material Request.");
- validated = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement