diff --git a/classes/order/Order.php b/classes/order/Order.php index 8899d7ea2..d479ac256 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -2857,17 +2857,6 @@ class OrderCore extends ObjectModel return $result; } - /** - * Get the Hotel Id of the order - * @return int|bool Hotel Id of the order - */ - public function getOrderHotelId() - { - return Db::getInstance()->getValue( - 'SELECT `id_hotel` FROM `'._DB_PREFIX_.'htl_booking_detail` WHERE `id_order` = '.(int) $this->id - ); - } - /** * @param bool $useTax: if true, total with tax, if false, total without tax * @param bool $withDiscounts: if true, total including discount, if false, total excluding discount diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php index f0e889a56..4241b427d 100644 --- a/classes/pdf/HTMLTemplateInvoice.php +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -318,7 +318,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate if (Module::isInstalled('hotelreservationsystem')) { $obj_htl_bk_dtl = new HotelBookingDetail(); $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail(); - $objHotelBranchInfo = new HotelBranchInformation((int) $order_obj->getOrderHotelId(), $this->context->language->id); + $objHotelBranchInfo = new HotelBranchInformation((int) HotelBookingDetail::getIdHotelByIdOrder($order_obj->id), $this->context->language->id); $invoiceAddressPatternRules['avoid'] = array('lastname'); if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) { $objHotelAddress = new Address((int) $idHotelAddress);