fix: dont attempt to set batch number if item doesn't have batch no (#29812)
This causes other triggers and unnecessary changes (e.g. price list)
This commit is contained in:
parent
4a33cdab34
commit
f89a64db48
@ -227,11 +227,11 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran
|
|||||||
},
|
},
|
||||||
callback:function(r){
|
callback:function(r){
|
||||||
if (in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
if (in_list(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
|
||||||
|
|
||||||
if (doc.doctype === 'Sales Invoice' && (!doc.update_stock)) return;
|
if (doc.doctype === 'Sales Invoice' && (!doc.update_stock)) return;
|
||||||
|
if (has_batch_no) {
|
||||||
me.set_batch_number(cdt, cdn);
|
me.set_batch_number(cdt, cdn);
|
||||||
me.batch_no(doc, cdt, cdn);
|
me.batch_no(doc, cdt, cdn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user