Added: Hotel address in the invoice, removed hotel column from the room type table
This commit is contained in:
@@ -314,10 +314,18 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
$service_product_data = array();
|
||||
$room_extra_demands = array();
|
||||
$room_additinal_services = array();
|
||||
$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
|
||||
$invoiceAddressPatternRules['avoid'] = array('lastname');
|
||||
if ($idHotelAddress = $objHotelBranchInfo->getHotelIdAddress()) {
|
||||
$objHotelAddress = new Address((int) $idHotelAddress);
|
||||
$formattedHotelAddress = AddressFormat::generateAddress($objHotelAddress, $invoiceAddressPatternRules, '<br />', ' ');
|
||||
}
|
||||
|
||||
$customer = new Customer($this->order->id_customer);
|
||||
if (!empty($order_details)) {
|
||||
@@ -591,6 +599,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
'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,
|
||||
|
||||
Reference in New Issue
Block a user