fix(dashboard): use max price for priciest gas
This commit is contained in:
@@ -26,7 +26,7 @@ class DashboardService
|
|||||||
$gas = $this->repository->retrieveGas();
|
$gas = $this->repository->retrieveGas();
|
||||||
$gNow = $gas->whereBetween('startDate', [$now->copy()->setHour(0), $now])->first();
|
$gNow = $gas->whereBetween('startDate', [$now->copy()->setHour(0), $now])->first();
|
||||||
$gCheapest = $gas->where('totalPriceTaxIncluded', $gas->min('totalPriceTaxIncluded'))->first();
|
$gCheapest = $gas->where('totalPriceTaxIncluded', $gas->min('totalPriceTaxIncluded'))->first();
|
||||||
$gPriciest = $gas->where('totalPriceTaxIncluded', $gas->min('totalPriceTaxIncluded'))->first();
|
$gPriciest = $gas->where('totalPriceTaxIncluded', $gas->max('totalPriceTaxIncluded'))->first();
|
||||||
|
|
||||||
return new DashboardData(
|
return new DashboardData(
|
||||||
$eNow,
|
$eNow,
|
||||||
|
|||||||
Reference in New Issue
Block a user