mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
committed by
Ankush Menat
parent
aab677c26f
commit
4768f4f278
@@ -13,6 +13,25 @@ frappe.ui.form.on('Stock Settings', {
|
|||||||
|
|
||||||
frm.set_query("default_warehouse", filters);
|
frm.set_query("default_warehouse", filters);
|
||||||
frm.set_query("sample_retention_warehouse", filters);
|
frm.set_query("sample_retention_warehouse", filters);
|
||||||
|
},
|
||||||
|
allow_negative_stock: function(frm) {
|
||||||
|
if (!frm.doc.allow_negative_stock) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let msg = __("Using negative stock disables FIFO/Moving average valuation when inventory is negative.");
|
||||||
|
msg += " ";
|
||||||
|
msg += __("This is considered dangerous from accounting point of view.")
|
||||||
|
msg += "<br>";
|
||||||
|
msg += ("Do you still want to enable negative inventory?");
|
||||||
|
|
||||||
|
frappe.confirm(
|
||||||
|
msg,
|
||||||
|
() => {},
|
||||||
|
() => {
|
||||||
|
frm.set_value("allow_negative_stock", 0);
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user