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

This commit is contained in:
Mihir Kandoi
2026-01-18 20:11:51 +05:30
parent 96c3fccb05
commit 56f5df6847

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);
},
});