Minor fix in delivery note, show paking items in order, show serial no of the respective item in the dropdown of packing item
This commit is contained in:
parent
05d0cd9574
commit
e887e92dd4
@ -66,9 +66,25 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
});
|
||||
}
|
||||
|
||||
if(this.frm.fields_dict["packed_items"].grid.get_field('batch_no')) {
|
||||
this.frm.set_query("batch_no", "packed_items", function(doc, cdt, cdn) {
|
||||
return me.set_query_for_batch(doc, cdt, cdn)
|
||||
});
|
||||
}
|
||||
|
||||
if(this.frm.fields_dict["items"].grid.get_field('batch_no')) {
|
||||
this.frm.set_query("batch_no", "items", function(doc, cdt, cdn) {
|
||||
return me.set_query_for_batch(doc, cdt, cdn)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
set_query_for_batch: function(doc, cdt, cdn) {
|
||||
// Show item's batches in the dropdown of batch no
|
||||
|
||||
var me = this;
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
|
||||
if(!item.item_code) {
|
||||
frappe.throw(__("Please enter Item Code to get batch no"));
|
||||
} else {
|
||||
@ -83,8 +99,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
filters: filters
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
|
@ -16,7 +16,7 @@ class PackedItem(Document):
|
||||
def get_product_bundle_items(item_code):
|
||||
return frappe.db.sql("""select t1.item_code, t1.qty, t1.uom, t1.description
|
||||
from `tabProduct Bundle Item` t1, `tabProduct Bundle` t2
|
||||
where t2.new_item_code=%s and t1.parent = t2.name""", item_code, as_dict=1)
|
||||
where t2.new_item_code=%s and t1.parent = t2.name order by t1.idx""", item_code, as_dict=1)
|
||||
|
||||
def get_packing_item_details(item):
|
||||
return frappe.db.sql("""select item_name, description, stock_uom from `tabItem`
|
||||
|
Loading…
x
Reference in New Issue
Block a user