If you’re manufacturing I would recommend the following client script:
frappe.ui.form.on('Stock Entry', {
validate: function(frm) {
$.each(frm.doc.items, function(i, d) {
d.allow_zero_valuation_rate = 1
});
}
});
Why? Stock entries that are created using a work order will enter in items with this value as 0 default.
In the future, the company I’m working with might want to track valuations and accounting the ERPNext, but they do not at this time.
Furthermore, once they do, they will want consumables like water to be in their BOM, but they doubtfully would want to know how much it will cost(infinitesimal).
In that case, maybe something like this?
frappe.ui.form.on('Stock Entry', {
validate: function(frm) {
$.each(frm.doc.items, function(i, d) {
if(d.item_group == 'Consumable') {
d.allow_zero_valuation_rate = 1
}
});
}
});