mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
* reset batch_no field if no batch number returned * on warehouse change, query for batch number
This commit is contained in:
@@ -198,6 +198,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
},
|
},
|
||||||
callback:function(r){
|
callback:function(r){
|
||||||
if (in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
if (in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||||
|
me.set_batch_number(cdt, cdn);
|
||||||
me.batch_no(doc, cdt, cdn);
|
me.batch_no(doc, cdt, cdn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -367,6 +368,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.message) {
|
if(r.message) {
|
||||||
frappe.model.set_value(doc.doctype, doc.name, 'batch_no', 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user