Small Changes:
- Config Vars - Added config variable "CompanyLogoSize" to set the logo size in the frontend. - API - Prices - Fixed returned string for invalid date periods.
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Repository\FareTableRepository;
|
||||
use App\Repository\RoomFareRepository;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Servicio para calcular los precios de las estancias.
|
||||
@@ -18,7 +19,8 @@ class PricesService
|
||||
|
||||
public function __construct(
|
||||
private FareTableRepository $repoFareTable,
|
||||
private RoomFareRepository $repoRoomFares
|
||||
private RoomFareRepository $repoRoomFares,
|
||||
private LoggerInterface $logger
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -34,7 +36,8 @@ class PricesService
|
||||
{
|
||||
$daysDiff = $startDate->diff($endDate)->days;
|
||||
if (!$daysDiff) {
|
||||
return "Invalid date period :( ";
|
||||
$this->logger->warning("PricesService.getFinalPricesForSearch - Invalid search period");
|
||||
return [];
|
||||
}
|
||||
|
||||
$fareTablesForPeriod = $this->repoFareTable->findFareTable($category->getId(), $startDate, $endDate);
|
||||
|
||||
Reference in New Issue
Block a user