empty Season bug
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3446 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
bfa4347692
commit
48131f72e2
3 changed files with 17 additions and 11 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++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue