feat: motor vehicle selector in entry form and routes

This commit is contained in:
2026-03-11 17:52:13 +01:00
parent 9a37bc444d
commit ffbbf2da44
4 changed files with 46 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ def index():
total_km = {}
total_co2 = 0.0
for entry in entries:
km = compute_km_for_entry(entry.journey_profile_id, journeys)
km = compute_km_for_entry(entry.journey_profile_id, journeys, entry.motor_vehicle_id)
for v, d in km.items():
total_km[v] = total_km.get(v, 0) + d
total_co2 += compute_co2_grams(km, vehicles)