Compare commits
3 commits
bfa4347692
...
0138bb6036
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0138bb6036 | ||
|
|
3fc27b87eb | ||
|
|
7a717af6c6 |
4 changed files with 18 additions and 12 deletions
|
|
@ -177,6 +177,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for price in fewo_lodging.prices %}
|
||||
{% if price.season is not empty %}
|
||||
<tr>
|
||||
<td data-title="Name">
|
||||
<strong class="small">
|
||||
|
|
@ -204,6 +205,7 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -531,6 +531,7 @@ class FewoLodging
|
|||
{
|
||||
|
||||
return $this->getPrices()->filter(function(FewoPrice $price) use ($dateFrom, $dateTo) {
|
||||
if(!empty($price->getSeason()))
|
||||
return ($price->getSeason()->getFromDate() >= $dateFrom && $price->getSeason()->getFromDate() <= $dateTo) ||
|
||||
($price->getSeason()->getToDate() >= $dateFrom && $price->getSeason()->getToDate() <= $dateTo);
|
||||
});
|
||||
|
|
@ -614,7 +615,7 @@ class FewoLodging
|
|||
public function getReservationsFilter($dateFrom, $dateTo)
|
||||
{
|
||||
return $this->getReservations()->filter(function(FewoReservation $reservation) use ($dateFrom, $dateTo) {
|
||||
return ($reservation->getFromDate() >= $dateFrom && $reservation->getFromDate() <= $dateTo) ||
|
||||
return ($reservation->getFromDate() >= $dateFrom && $reservation->getFromDate() <= $dateTo) ||
|
||||
($reservation->getToDate() >= $dateFrom && $reservation->getToDate() <= $dateTo);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -780,20 +780,23 @@ class LodgingCalendarService
|
|||
$checkDay = $paddedCalendar[$mSdt->format("Y-n")]['data'][$key];
|
||||
|
||||
|
||||
if(!empty($checkDay->getPrice()->getSeason()) && $minDays != $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
|
||||
if($minDays > $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
$last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
if(!empty($checkDay->getPrice())){
|
||||
if(!empty($checkDay->getPrice()->getSeason()) && $minDays != $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
|
||||
if($minDays > $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
$last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
|
||||
|
||||
$setMinStayTo->modify('-'.($last).' days');
|
||||
$setMinStayTo->modify('-'.($last).' days');
|
||||
}
|
||||
if($minDays < $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
$last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
$setMinStayTo->modify('-'.($last).' days');
|
||||
|
||||
}
|
||||
$minDays = $checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
}
|
||||
if($minDays < $checkDay->getPrice()->getSeason()->getMinimumStay()){
|
||||
$last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
$setMinStayTo->modify('-'.($last).' days');
|
||||
|
||||
}
|
||||
$minDays = $checkDay->getPrice()->getSeason()->getMinimumStay();
|
||||
}
|
||||
$counter++;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ libxml_use_internal_errors(true);
|
|||
$loader = require __DIR__.'/../app/autoload.php';
|
||||
include_once __DIR__.'/../var/bootstrap.php.cache';
|
||||
|
||||
$kernel = new AppKernel('prod', false);
|
||||
$kernel = new AppKernel('dev', true);
|
||||
$kernel->loadClassCache();
|
||||
//$kernel = new AppCache($kernel);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue