Merge pull request #12659 from tundebabzy/issue-12658

set batch number only in Sales Invoice and Delivery Note - #12659
This commit is contained in:
tundebabzy
2018-01-26 06:10:13 +01:00
committed by GitHub

View File

@@ -340,7 +340,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
conversion_factor: function(doc, cdt, cdn, dont_fetch_price_list_rate) {
this._super(doc, cdt, cdn, dont_fetch_price_list_rate);
if(frappe.meta.get_docfield(cdt, "stock_qty", cdn)) {
if(frappe.meta.get_docfield(cdt, "stock_qty", cdn) &&
in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
this.set_batch_number(cdt, cdn);
}
},