Skip to content
10 changes: 9 additions & 1 deletion classes/pdf/HTMLTemplateInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,17 @@ public function getContent()
$service_product_data = array();
$room_extra_demands = array();
$room_additinal_services = array();
$formattedHotelAddress = '';
if (Module::isInstalled('hotelreservationsystem')) {
$obj_htl_bk_dtl = new HotelBookingDetail();
$obj_rm_type = new HotelRoomType();
$objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail();
$objHotelBranchInfo = new HotelBranchInformation((int) HotelBookingDetail::getIdHotelByIdOrder($order_obj->id), $this->context->language->id);
$invoiceAddressPatternRules['avoid'][] = 'lastname';
if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) {
$objHotelAddress = new Address((int) $idHotelAddress);
$objHotelAddress->firstname = $objHotelBranchInfo->hotel_name;
$formattedHotelAddress = AddressFormat::generateAddress($objHotelAddress, $invoiceAddressPatternRules, '<br />', ' ');
}

$customer = new Customer($this->order->id_customer);
if (!empty($order_details)) {
Expand Down Expand Up @@ -591,6 +598,7 @@ public function getContent()
'cart_rules' => $cart_rules,
'delivery_address' => $formatted_delivery_address,
'invoice_address' => $formatted_invoice_address,
'hotel_address' => $formattedHotelAddress,
'addresses' => array('invoice' => $invoice_address, 'delivery' => $delivery_address),
'tax_excluded_display' => $tax_excluded_display,
'display_product_images' => $display_product_images,
Expand Down
7 changes: 6 additions & 1 deletion pdf/invoice.addresses-tab.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
{$delivery_address}
{/if}
</td> -->
<td width="33%"></td>
<td width="33%">
<span class="bold">{l s='Hotel Detail' pdf='true'}</span><br/><br/>
{if $hotel_address}
{$hotel_address}
{/if}
</td>
<td width="33%"></td>
<td width="33%">
<span class="bold">{l s='Customer Detail' pdf='true'}</span><br/><br/>
Expand Down
8 changes: 1 addition & 7 deletions pdf/invoice.product-tab.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@
<table class="product" class="bordered-table" width="100%" cellpadding="4" cellspacing="0">
<thead>
<tr>
<th colspan="{if $display_product_images}9{else}8{/if}" class="header">{l s='Rooms Details' pdf='true'}</th>
<th colspan="{if $display_product_images}8{else}7{/if}" class="header">{l s='Rooms Details' pdf='true'}</th>
</tr>
<tr>
{if $display_product_images}
<th class="product header small">{l s='Room Image' pdf='true'}</th>
{/if}
<th class="product header small">{l s='Room Description' pdf='true'}</th>
<th class="product header small">{l s='Hotel' pdf='true'}</th>
<th class="product header small">{l s='Tax Rate(s)' pdf='true'}</th>
{* {if isset($layout.before_discount)}
<th class="product header small">{l s='Base price' pdf='true'} <br /> {l s='(Tax excl.)' pdf='true'}</th>
Expand Down Expand Up @@ -62,11 +61,6 @@
{$data_v['name']}
</p>
</td>
<td class="product center">
<p>
{$data_v['hotel_name']}
</p>
</td>
<td class="product center">
{$data_v['order_detail_tax_label']}
</td>
Expand Down