fix(UX): only show pick list when picking is pending
[skip ci]
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 0b48f70..26c9996 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -152,7 +152,9 @@
}
}
- this.frm.add_custom_button(__('Pick List'), () => this.create_pick_list(), __('Create'));
+ if (flt(doc.per_picked, 6) < 100 && flt(doc.per_delivered, 6) < 100) {
+ this.frm.add_custom_button(__('Pick List'), () => this.create_pick_list(), __('Create'));
+ }
const order_is_a_sale = ["Sales", "Shopping Cart"].indexOf(doc.order_type) !== -1;
const order_is_maintenance = ["Maintenance"].indexOf(doc.order_type) !== -1;