From 9777c2ff1ba8682c832d6325a34d0baabace792c Mon Sep 17 00:00:00 2001 From: "Sven (AAMOS AI)" Date: Sun, 16 Aug 2026 22:49:09 +0700 Subject: [PATCH] fix(api): round estimated shopping price to integer minor units --- apps/api/src/routes/shopping.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/routes/shopping.ts b/apps/api/src/routes/shopping.ts index afb3426..2c5a20b 100644 --- a/apps/api/src/routes/shopping.ts +++ b/apps/api/src/routes/shopping.ts @@ -387,7 +387,7 @@ async function generateItemsFromPlan( const rounded = targetUnit === "COUNT" ? Math.ceil(qty) : Math.ceil(qty * 10) / 10; const estimatedPrice = info?.defaultPriceMinorPerKg != null - ? Math.round((need.grams / 1000) * info.defaultPriceMinorPerKg * 10) / 10 + ? Math.round((need.grams / 1000) * info.defaultPriceMinorPerKg) : null; await app.db.insert(schema.shoppingListItems).values({