diff --git a/modules/erp/lager/service.php b/modules/erp/lager/service.php index fcfb98e..a106259 100644 --- a/modules/erp/lager/service.php +++ b/modules/erp/lager/service.php @@ -35,7 +35,15 @@ function get_otc_order_form_products(PDO $pdo): array WHERE p.status = 'active' GROUP BY p.id, p.name HAVING COALESCE(SUM(v.qty_net), 0) > 0 - ORDER BY p.name ASC, p.id ASC" + ORDER BY + CASE + WHEN p.name ILIKE '%shiitake%' THEN 1 + WHEN p.name ILIKE '%reishi%' THEN 2 + WHEN p.name ILIKE '%lion''s mane%' THEN 3 + WHEN p.name ILIKE '%chaga%' THEN 4 + ELSE 99 + END, + p.id ASC" ); $products = [];