From b11bf8eb795c101b090fa789ab4eb4fa26f361a3 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 --- .../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 918be507d3a..36c46cf9adb 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -217,8 +217,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); }