fix: remove serial no if qty is zero

(cherry picked from commit 3a4ae8c463)
This commit is contained in:
Rohit Waghchaure
2025-02-11 13:31:24 +05:30
committed by Mergify
parent 179cb1e6e5
commit 1359a77e72

View File

@@ -295,6 +295,11 @@ frappe.ui.form.on("Stock Reconciliation Item", {
qty: function (frm, cdt, cdn) {
frm.events.set_amount_quantity(frm, cdt, cdn);
let row = locals[cdt][cdn];
if (row.use_serial_batch_fields && !row.qty && row.serial_no) {
frappe.model.set_value(cdt, cdn, "serial_no", "");
}
},
valuation_rate: function (frm, cdt, cdn) {