fix(UX): only show pick list when picking is pending

[skip ci]
This commit is contained in:
Ankush Menat 2022-04-27 14:41:50 +05:30
parent 47e1a0104c
commit 9a8e3ef235

View File

@ -152,7 +152,9 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex
}
}
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;