Added assertCapacity() checks before saving (matches single receive) Added applyCapacityDelta() after save to increment counters Now validates warehouse → yard → zone capacity hierarchy Single receive already had both checks; bulk receive was gap.
Backend: FuelService + FuelController: - Added getFleetFuelStats() aggregating all vehicles - Route: GET /api/fuel/stats (before :vehicleId route) - Returns: totalCost, totalLiters, totalPurchases, averagePricePerLiter MaintenanceService + MaintenanceController: - Added getFleetMaintenanceStats() aggregating all vehicles - Route: GET /api/maintenance/stats (before :vehicleId route) - Returns: totalCost, numberOfMaintenanceItems, averageCostPerMaintenance, costByType Both endpoints aggregate over past 12 months (customizable via query param). Enables dashboard to show fleet-wide operating costs. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Service/Controller/Module: - scheduleMaintenanceAsync: schedule work - recordMaintenanceCost: log expenses - getUpcomingMaintenance: due items - getVehicleMaintenanceStats: cost aggregation Endpoints: - POST /maintenance/schedules - POST /maintenance/costs - PATCH /maintenance/schedules/:id - GET /maintenance/upcoming/:vehicleId - GET /maintenance/history/:vehicleId - GET /maintenance/stats/:vehicleId Migration: idempotent maintenance tables creation Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>