mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 09:42:53 +00:00
Problem: - purchasesData from API returns numeric columns as strings - Calling .toFixed() on strings throws "toFixed is not a function" - Occurs in stats cards and table rows Solution: - Wrap p.liters, p.costPerLiter, p.totalCost in Number() before calculations - Total Liters stat card: sum + Number(p.liters) - Total Cost stat card: sum + Number(p.totalCost) - Avg Price/L stat card: use Number() on both divisor and dividend - Table rows: Number(purchase.liters).toFixed(2), etc. Fixes render error in FuelPurchasePage when loading fuel purchases list. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>