minor changes in packing slip

This commit is contained in:
Nabin Hait 2015-01-15 11:24:06 +05:30
parent 5293aa7ca0
commit 45a5d52a2a

View File

@ -8,12 +8,15 @@ cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
}
cur_frm.fields_dict['items'].grid.get_field('item_code').get_query =
function(doc, cdt, cdn) {
return {
query: "erpnext.stock.doctype.packing_slip.packing_slip.item_details",
filters:{ 'delivery_note': doc.delivery_note}
}
cur_frm.fields_dict['items'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
if(!doc.delivery_note) {
frappe.throw(__("Please Delivery Note first"))
} else {
return {
query: "erpnext.stock.doctype.packing_slip.packing_slip.item_details",
filters:{ 'delivery_note': doc.delivery_note}
}
}
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {