Fix contingent import missing data of aliased hotel codes when deleted

This commit is contained in:
Björn Fromme
2020-09-29 14:44:13 +02:00
parent 8b22da7ae0
commit b341055ce9
@@ -165,7 +165,7 @@ class ContingentImportService implements SingletonInterface, LoggerAwareInterfac
$hotelCode = (string) $xmlContingent['code'];
$sql = 'SELECT h.uid uid
FROM tx_epproducts_domain_model_hotel h
LEFT JOIN tx_epproducts_domain_model_matchcode m ON (h.uid = m.entity AND m.entity_type = "hotel")
LEFT JOIN tx_epproducts_domain_model_matchcode m ON (h.uid = m.entity AND m.entity_type = "hotel" AND m.deleted = 0)
WHERE h.deleted = 0 AND h.hidden = 0 AND h.code = :code OR m.code = :code
LIMIT 0,1';
$hotelData = $this->db->fetchAssoc($sql, ['code' => $hotelCode]);