Files
edr-platform/apps/edr-freight-web/backoffice
natib21 67ba168a22 fix: convert numeric strings to numbers in fuel calculations
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>
2026-06-30 14:21:16 +00:00
..
2026-06-20 09:52:24 +03:00
2026-06-24 09:56:12 +03:00
2026-06-13 14:32:26 +03:00
2026-06-20 09:25:23 +00:00
2026-05-12 15:17:16 +03:00
2026-06-27 08:14:05 +03:00
2026-06-23 15:02:25 +03:00
2026-05-12 15:17:16 +03:00