chore: update fg_item_qty based on qty in PO Item
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 582f23e..b5051eb 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -112,6 +112,16 @@
set_schedule_date(frm);
}
}
+ },
+
+ qty: function(frm, cdt, cdn) {
+ if (frm.doc.is_subcontracted && !frm.doc.is_old_subcontracting_flow) {
+ var row = locals[cdt][cdn];
+
+ if (row.qty) {
+ row.fg_item_qty = row.qty;
+ }
+ }
}
});