Updated: Removed LIMIT for all refuel records, fixed fuel consumption calculation on dashboard
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 12s

This commit is contained in:
2025-02-01 22:56:32 +01:00
parent 652b04bfa1
commit 4576800e27
3 changed files with 42 additions and 26 deletions

View File

@ -12,7 +12,7 @@ class DashboardController extends Controller {
"mileage" => [],
"liters" => []
];
$raw_data = $default_car ? $refuel->latest_data($default_car['id'], 5) : [];
$raw_data = $default_car ? $refuel->latest_data($default_car['id'], 0) : [];
foreach($raw_data as $one) {
array_push($data['date'], date('d. m.', strtotime($one['created_at'])));
array_push($data['price'], $one['price_per_liter']);