fix: setting process loss qty causes fg item qty to be incorrect

(cherry picked from commit 56f5df6847)
This commit is contained in:
Mihir Kandoi
2026-01-18 20:11:51 +05:30
committed by Mergify
parent c22d7e16d1
commit cb2d4550af

View File

@@ -885,12 +885,11 @@ frappe.ui.form.on("Stock Entry", {
frm.doc.items.forEach((item) => {
if (item.is_finished_item) {
fg_completed_qty += flt(item.transfer_qty);
fg_completed_qty += flt(item.transfer_qty + frm.doc.process_loss_qty);
}
});
frm.doc.fg_completed_qty = fg_completed_qty;
frm.refresh_field("fg_completed_qty");
frm.set_value("fg_completed_qty", fg_completed_qty);
},
});