fix: revert considering additional hotelcodes for contingent calendar
This commit is contained in:
@@ -37,15 +37,12 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
|
|
||||||
class ContingentRepository extends AbstractRepository implements ProviderInterface
|
class ContingentRepository extends AbstractRepository implements ProviderInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DateTime $begin
|
|
||||||
* @param \DateTime|null $end
|
|
||||||
* @param array $options
|
|
||||||
* @return EventInterface[]
|
* @return EventInterface[]
|
||||||
|
*
|
||||||
* @throws DBALException
|
* @throws DBALException
|
||||||
*/
|
*/
|
||||||
public function getEvents(\DateTime $begin, \DateTime $end = null, array $options = []): array
|
public function getEvents(\DateTime $begin, ?\DateTime $end = null, array $options = []): array
|
||||||
{
|
{
|
||||||
$optionsResolver = new OptionsResolver();
|
$optionsResolver = new OptionsResolver();
|
||||||
$optionsResolver->setRequired(['hotel']);
|
$optionsResolver->setRequired(['hotel']);
|
||||||
@@ -59,11 +56,11 @@ class ContingentRepository extends AbstractRepository implements ProviderInterfa
|
|||||||
|
|
||||||
$qb
|
$qb
|
||||||
->select('c.status as status', 'c.date as date', 'c.min_price as minPrice', 'c.pax', 'c.available', 'c.room_code')
|
->select('c.status as status', 'c.date as date', 'c.min_price as minPrice', 'c.pax', 'c.available', 'c.room_code')
|
||||||
->innerJoin('c', 'tx_epproducts_domain_model_hotel', 'h', 'c.hotel = h.uid')
|
// ->innerJoin('c', 'tx_epproducts_domain_model_hotel', 'h', 'c.hotel = h.uid')
|
||||||
->leftJoin('c', 'tx_epproducts_domain_model_matchcode', 'm', 'h.uid = m.entity AND m.entity_type = "hotel"')
|
// ->leftJoin('c', 'tx_epproducts_domain_model_matchcode', 'm', 'h.uid = m.entity AND m.entity_type = "hotel"')
|
||||||
->from('tx_epproducts_domain_model_contingent', 'c')
|
->from('tx_epproducts_domain_model_contingent', 'c')
|
||||||
->where('c.hotel = :hotelUid')
|
->where('c.hotel = :hotelUid')
|
||||||
->orWhere('c.hotel_code = m.code')
|
// ->orWhere('c.hotel_code = m.code')
|
||||||
->andWhere('c.date >= :dateFrom')
|
->andWhere('c.date >= :dateFrom')
|
||||||
->setParameter('hotelUid', $hotel->getUid())
|
->setParameter('hotelUid', $hotel->getUid())
|
||||||
->setParameter('dateFrom', $begin->format('Y-m-d'))
|
->setParameter('dateFrom', $begin->format('Y-m-d'))
|
||||||
|
|||||||
Reference in New Issue
Block a user