diff --git a/db/routines/vn/procedures/item_getBalance.sql b/db/routines/vn/procedures/item_getBalance.sql index 46e4bafcc..3a594c81c 100644 --- a/db/routines/vn/procedures/item_getBalance.sql +++ b/db/routines/vn/procedures/item_getBalance.sql @@ -189,7 +189,7 @@ BEGIN SELECT * FROM sales UNION ALL SELECT * FROM orders - ORDER BY shipped DESC, + ORDER BY shipped, (inventorySupplierFk = entityId) DESC, alertLevel DESC, isTicket,