Commit 8668d16e by Yvon Kerdoncuff

in reception app, when filtering out products already present in order, take…

in reception app, when filtering out products already present in order, take into account product being edited if exists
parent e75db440
......@@ -437,6 +437,9 @@ function fetch_suppliers_products() {
// Filter supplier products on products already in orders
suppliers_products = suppliers_products.filter(p => list_to_process.findIndex(ptp => ptp.product_id[1] === p.name) === -1);
suppliers_products = suppliers_products.filter(p => list_processed.findIndex(pp => pp.product_id[1] === p.name) === -1);
if(editing_product) {
suppliers_products = suppliers_products.filter(p => [editing_product].findIndex(pp => pp.product_id[1] === p.name) === -1);
}
closeModal();
set_add_products_modal();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment