Fixed : booking voucher pdf column issue

This commit is contained in:
azhar bhat
2026-10-26 16:47:06 +05:30
parent 95f45ce577
commit f6cec5decf
2 changed files with 18 additions and 8 deletions

View File

@@ -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'],
);
}
}

View File

@@ -171,24 +171,28 @@
<table class="bordered-table" width="100%" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<th colspan="3" class="header-left small">{l s='SERVICES DETAILS' pdf='true'}</th>
<th colspan="5" class="header-left small">{l s='SERVICES DETAILS' pdf='true'}</th>
</tr>
<tr>
<th class="header-left small" width="35%">{l s='Room Type' pdf='true'}</th>
<th class="header-left small" width="45%">{l s='Service Name' pdf='true'}</th>
<th class="header-left small" width="20%">{l s='Qty' pdf='true'}</th>
<th class="header-left small" width="25%">{l s='Room Type' pdf='true'}</th>
<th class="header-left small" width="25%">{l s='Service Name' pdf='true'}</th>
<th class="header-left small" width="20%">{l s='Unit Price (tax excl.)' pdf='true'}</th>
<th class="header-left small" width="10%">{l s='Qty' pdf='true'}</th>
<th class="header-left small" width="20%">{l s='Total (tax excl.)' pdf='true'}</th>
</tr>
{foreach from=$service_groups item=group}
{foreach from=$group.services item=service name=service_loop}
<tr>
{if $smarty.foreach.service_loop.first}
<td class="small white" width="35%" rowspan="{$group.services|@count}">{$group.room_type_name|escape:'html':'UTF-8'}<br />
<td class="small white" width="25%" rowspan="{$group.services|@count}">{$group.room_type_name|escape:'html':'UTF-8'}<br />
{$group.check_in_date|escape:'html':'UTF-8'} - {$group.check_out_date|escape:'html':'UTF-8'}<br />
{l s='Room' pdf='true'} - {$group.room_count|intval}
</td>
{/if}
<td class="small white" width="45%">{$service.name|escape:'html':'UTF-8'}</td>
<td class="small white" width="20%">{$service.quantity|intval}</td>
<td class="small white" width="25%">{$service.name|escape:'html':'UTF-8'}</td>
<td class="small white" width="20%">{displayPrice currency=$order->id_currency price=$service.unit_price_tax_excl}</td>
<td class="small white" width="10%">{if $service.allow_multiple_quantity}{$service.quantity|intval}{else}--{/if}</td>
<td class="small white" width="20%">{displayPrice currency=$order->id_currency price=$service.total_price_tax_excl}</td>
</tr>
{/foreach}
{/foreach}