From 89660c90708e7cedecf99125ed267c2b83409c0d Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 9 Jul 2025 20:59:11 +0530 Subject: [PATCH] fix: use planned_qty instead of pending_qty to check if WO should be created against PP (cherry picked from commit b11bf8eb795c101b090fa789ab4eb4fa26f361a3) --- .../manufacturing/doctype/production_plan/production_plan.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 268bf847a90..1d55c64663f 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -203,8 +203,8 @@ frappe.ui.form.on("Production Plan", { let has_items = items.filter((item) => { - if (item.pending_qty) { - return item.pending_qty > item.ordered_qty; + if (item.planned_qty) { + return item.planned_qty > item.ordered_qty; } else { return item.qty > (item.received_qty || item.ordered_qty); }