From f6cec5decf49c7554e301cf00e5e608d5703b8ea Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Mon, 26 Oct 2026 16:47:06 +0530 Subject: [PATCH] Fixed : booking voucher pdf column issue --- classes/pdf/HTMLTemplateBookingVoucher.php | 8 +++++++- pdf/booking-voucher.tpl | 18 +++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/classes/pdf/HTMLTemplateBookingVoucher.php b/classes/pdf/HTMLTemplateBookingVoucher.php index b3b2fece0..d4f35fe07 100644 --- a/classes/pdf/HTMLTemplateBookingVoucher.php +++ b/classes/pdf/HTMLTemplateBookingVoucher.php @@ -177,7 +177,13 @@ class HTMLTemplateBookingVoucherCore extends HTMLTemplate ); if (isset($additionalServices[(int)$booking['id']]['additional_services'])) { foreach ($additionalServices[(int)$booking['id']]['additional_services'] as $service) { - $bookingServices[] = array('name' => $service['name'], 'quantity' => (int)$service['quantity']); + $bookingServices[] = array( + 'name' => $service['name'], + 'quantity' => (int)$service['quantity'], + 'unit_price_tax_excl' => (float)$service['unit_price_tax_excl'], + 'total_price_tax_excl' => (float)$service['total_price_tax_excl'], + 'allow_multiple_quantity' => (int)$service['allow_multiple_quantity'], + ); } } diff --git a/pdf/booking-voucher.tpl b/pdf/booking-voucher.tpl index bcc0fc8f0..8acdf030a 100644 --- a/pdf/booking-voucher.tpl +++ b/pdf/booking-voucher.tpl @@ -171,24 +171,28 @@ - + - - - + + + + + {foreach from=$service_groups item=group} {foreach from=$group.services item=service name=service_loop} {if $smarty.foreach.service_loop.first} - {/if} - - + + + + {/foreach} {/foreach}
{l s='SERVICES DETAILS' pdf='true'}{l s='SERVICES DETAILS' pdf='true'}
{l s='Room Type' pdf='true'}{l s='Service Name' pdf='true'}{l s='Qty' pdf='true'}{l s='Room Type' pdf='true'}{l s='Service Name' pdf='true'}{l s='Unit Price (tax excl.)' pdf='true'}{l s='Qty' pdf='true'}{l s='Total (tax excl.)' pdf='true'}
{$group.room_type_name|escape:'html':'UTF-8'}
+
{$group.room_type_name|escape:'html':'UTF-8'}
{$group.check_in_date|escape:'html':'UTF-8'} - {$group.check_out_date|escape:'html':'UTF-8'}
{l s='Room' pdf='true'} - {$group.room_count|intval}
{$service.name|escape:'html':'UTF-8'}{$service.quantity|intval}{$service.name|escape:'html':'UTF-8'}{displayPrice currency=$order->id_currency price=$service.unit_price_tax_excl}{if $service.allow_multiple_quantity}{$service.quantity|intval}{else}--{/if}{displayPrice currency=$order->id_currency price=$service.total_price_tax_excl}