From 2dc5ca660ccb1d163c6d4e463f42c342d666717a Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Mon, 28 Apr 2025 10:01:10 +0530 Subject: [PATCH] Fixed: hotel name in not shown properly in the invoice, in hotel detail --- classes/pdf/HTMLTemplateInvoice.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php index 4dbacf732..f0e889a56 100644 --- a/classes/pdf/HTMLTemplateInvoice.php +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -317,13 +317,12 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate $formattedHotelAddress = false; if (Module::isInstalled('hotelreservationsystem')) { $obj_htl_bk_dtl = new HotelBookingDetail(); - $obj_rm_type = new HotelRoomType(); $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail(); - $objHotelBranchInfo = new HotelBranchInformation((int) $order_obj->getOrderHotelId()); - // since hotel address has same firstname and lastname we are going to remove the lastname + $objHotelBranchInfo = new HotelBranchInformation((int) $order_obj->getOrderHotelId(), $this->context->language->id); $invoiceAddressPatternRules['avoid'] = array('lastname'); if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) { $objHotelAddress = new Address((int) $idHotelAddress); + $objHotelAddress->firstname = $objHotelBranchInfo->hotel_name; $formattedHotelAddress = AddressFormat::generateAddress($objHotelAddress, $invoiceAddressPatternRules, '
', ' '); }