Fix incorrect calculation of total price for flex products
This commit is contained in:
@@ -91,7 +91,7 @@ class ContingentDataService
|
|||||||
) {
|
) {
|
||||||
$data = $this->contingentRepository->getAvailableRooms($dateFrom, $dateTo, $hotel, $product);
|
$data = $this->contingentRepository->getAvailableRooms($dateFrom, $dateTo, $hotel, $product);
|
||||||
$period = new Period($dateFrom, $dateTo);
|
$period = new Period($dateFrom, $dateTo);
|
||||||
$nights = $period->getDateInterval()->format('%a');
|
$nights = $period->dateInterval()->format('%a');
|
||||||
|
|
||||||
$rooms = [];
|
$rooms = [];
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ class ContingentDataService
|
|||||||
$row['servicesIncluded'] = unserialize($row['servicesIncluded'], ['allowed_classes' => false]);
|
$row['servicesIncluded'] = unserialize($row['servicesIncluded'], ['allowed_classes' => false]);
|
||||||
$row['servicesOptional'] = unserialize($row['servicesOptional'], ['allowed_classes' => false]);
|
$row['servicesOptional'] = unserialize($row['servicesOptional'], ['allowed_classes' => false]);
|
||||||
|
|
||||||
$row['priceForSelection'] = $row['price'] * $row['minNights'] + ($nights - $row['minNights']) * $row['additionalNightPrice'];
|
$row['priceForSelection'] = $row['price'] + ($nights - $row['minNights']) * $row['additionalNightPrice'];
|
||||||
|
|
||||||
$rooms[] = $row;
|
$rooms[] = $row;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user