* reset batch_no field if no batch number returned * on warehouse change, query for batch number
This commit is contained in:
parent
2d48cc0aa9
commit
8ae53cacc5
@ -198,6 +198,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
},
|
||||
callback:function(r){
|
||||
if (in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||
me.set_batch_number(cdt, cdn);
|
||||
me.batch_no(doc, cdt, cdn);
|
||||
}
|
||||
}
|
||||
@ -367,6 +368,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
callback: function(r) {
|
||||
if(r.message) {
|
||||
frappe.model.set_value(doc.doctype, doc.name, 'batch_no', r.message);
|
||||
} else {
|
||||
frappe.model.set_value(doc.doctype, doc.name, 'batch_no', r.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user