[fix] Fetch serial nos on change of Warehouse

This commit is contained in:
Nabin Hait 2016-12-24 10:42:23 +05:30
parent 58291c77e9
commit 1d90b41aea
3 changed files with 3 additions and 3 deletions

View File

@ -212,7 +212,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
item_code: item.item_code,
warehouse: item.warehouse,
qty: item.qty,
serial_no:item.serial_no
serial_no: item.serial_no || ""
},
callback:function(r){
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {

View File

@ -1691,7 +1691,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-11-23 12:33:37.728117",
"modified": "2016-12-24 12:33:37.728117",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",

View File

@ -384,7 +384,7 @@ def get_serial_no_details(item_code, warehouse, qty, serial_no):
return {'serial_no': serial_no}
@frappe.whitelist()
def get_bin_details_and_serial_nos(item_code, warehouse, qty, serial_no):
def get_bin_details_and_serial_nos(item_code, warehouse, qty=None, serial_no=None):
bin_details_and_serial_nos = {}
bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse))
bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))