tstat_be/app/Views/pdf.php

722 lines
29 KiB
PHP

<!DOCTYPE html>
<head>
<style>
body{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.header-table, .invoice-content-table, .invoice-table table, .invoice-table-design, .foooter-section{
width: 100%;
}
.header-table, .invoice-content-table, .invoice-table, .invoice-table-design, .foooter-section{
margin-top: 30px;
}
.header-table td, .invoice-content-table td{
width:50%;
}
.header-table td.company-details, .invoice-table td.quotation-heading{
text-align: right;
font-size: xx-large;
}
.header-section-text{
text-align: right;
color:#0d79af;
font-size: 25px;
}
.text-left{
text-align: left;
}
.text-right{
text-align: right;
}
.text-center{
text-align: center;
}
.invoice-table{
border:1px solid #a4aeb1;
border-radius: 10px;
background-color: #f7f8f9;
padding-left: 10px;
padding-right: 10px;
}
.invoice-table-design{
border-collapse: collapse;
}
.invoice-table-design th{
background: #0d79af;
border: 1px solid #d8dadd;
color: #ffffff;
padding:8px;
text-transform: uppercase;
font-size: 14px;
}
.invoice-table-design td{
border: 1px solid #dddddd;
padding:10px;
}
.invoice-table .qsub-heading{
color: #6b7577;
margin-bottom: 5px;
}
.foooter-section{
border-top: 1px solid #000000;
padding-top: 10px;
}
.border-bottom-dotted td{
border-bottom: 1px dotted #a4aeb1;
}
.quotation-heading .quo-heading1{
padding-top: 10px;
padding-bottom: 10px;
vertical-align: top;
}
.invoice-table.services{
border-color:#0d79afeb;
}
.invoice-table.services th{
font-weight: 500;
padding-top:10px;
padding-bottom:10px;
font-size: 17px;
border-bottom: 1px solid #82868af2;
}
.quotation-company span{
font-size: 15px;
}
.quotation-company div{
margin-bottom: 8px;
}
.quotation-code {
text-align: right;
}
.icon{
width:16px;
height:16px;
}
.quotation-code .invoice-table{
padding: 0;
background-color: transparent;
}
.quotation-code table{
border-collapse: collapse;
}
.quotation-code td{
padding: 8px;
}
.user-name{
font-size: 24px!important;
}
.user-email{
font-size: 14px!important;
}
/* .quotation-code td:first-child, .quotation-code td:last-child{
border-bottom: 1px solid #d8d9dbf2;
}
.quotation-code td:last-child{
border-left: 1px solid #d8d9dbf2;
color: #615d5d;
} */
</style>
</head>
<body>
<?php if($data['view'] == false){ ?>
<!-- Define header -->
<htmlpageheader name="myHeader">
<div class="header" style="height: 100px;"> <!-- Fixed height for header -->
<table class="header-table" style="width: 100%;">
<tr class="header-section">
<td class="header-logo" style="width: 120px;">
<?php if(isset($data['org_data']['logo'])) : if (!empty($data['org_data']['logo'])):
$orgLogoFilename = basename($data['org_data']['logo']);
$orgLogo = base_url("assets/images/logo/" . $orgLogoFilename);
?>
<img src="<?= $orgLogo ?>" alt="Logo" style="max-height: 80px; max-width: 100%; height: auto;" />
<?php endif; ?>
<?php endif; ?>
</td>
<td class="header-section-text" style="text-align: right; vertical-align: middle;">
Trip ID #<?= $data['plan_id'] ?>
</td>
</tr>
</table>
</div>
</htmlpageheader>
<!-- Define footer -->
<htmlpagefooter name="myFooter">
<div class="footer">
<table class="foooter-section">
<tr class="footer-text">
<td class="text-center"><?php if (isset($data['org_data']['name'])): ?> @<?= $data['org_data']['name'] ?> <?php endif; ?></td>
</tr>
</table>
</div>
</htmlpagefooter>
<!-- Apply header/footer to all pages -->
<sethtmlpageheader name="myHeader" value="on" show-this-page="1" />
<sethtmlpagefooter name="myFooter" value="on" />
<?php } ?>
<!--- user details --->
<table class="invoice-content-table" >
<tr class="invoice-section">
<td class="quotation-company">
<?php if (isset($data['logo']) && $data['view'] !== false):
$logoFilename = basename($data['logo']);
$logo = base_url("assets/images/logo/" . $logoFilename);
?>
<div class="org-logo" style="width: 120px;">
<img src="<?= $logo ?>" alt="Logo" style="max-height: 80px; max-width: 100%; height: auto;" />
</div>
<?php endif; ?>
<div>
<span class="user-name"><?= esc($data['user_data']['first_name']) ?> <?= esc($data['user_data']['last_name']) ?> <?php if($data['user_data']['employee_code']){ echo '- '.$data['user_data']['employee_code']; } ?> </span>
</div>
<div>
<span class="user-email" ><?= esc($data['user_data']['email']) ?></span>,
<span class="user-email" ><?= esc($data['user_data']['mobile_no']) ?></span>.
</div>
</td>
<?php if($data['trip_type_value'] == 'International'){ ?>
<td class="quotation-code" style="border:1px solid #ddd; border-radius:10px;">
<table style="width:100%;">
<tr>
<td style="text-align:left; border-bottom:1px solid #ddd; border-right:1px solid #ddd;">Passport No</td>
<td style="text-align:left; border-bottom:1px solid #ddd; color:#6b6b6b; "><?= ($data['user_data']['passport_number']) ?? '' ?></td>
</tr>
<tr>
<td style="text-align:left; border-bottom:1px solid #ddd; border-right:1px solid #ddd;">Expiry Date</td>
<td style="text-align:left; border-bottom:1px solid #ddd; color:#6b6b6b;"><?= $data['user_data']['date_of_expiry'] ? date('d, M y', strtotime($data['user_data']['date_of_expiry'])) : '' ?></td>
</tr>
<tr>
<td style="text-align:left; border-bottom:1px solid #ddd; border-right:1px solid #ddd;">Place Of Issue</td>
<td style="text-align:left; border-bottom:1px solid #ddd; color:#6b6b6b;"><?= ($data['user_data']['place_of_issue']) ?? '' ?></td>
</tr>
<tr>
<td style="text-align:left; border-right:1px solid #ddd;">Forex Card Number</td>
<td style="text-align:left; color:#6b6b6b;"><?= ($data['user_data']['forex_pre_paid_card_number']) ?? '' ?></td>
</tr>
</table>
</td>
<?php } ?>
</tr>
</table>
<?php if($data['trip_type_value'] == 'International'){ ?>
<table class="invoice-content-table" >
<tr class="invoice-section">
<td class="quotation-code" style="border:1px solid #ddd; border-radius:10px;">
<table style="width:100%;">
<tr>
<td style="text-align:left; border-bottom:1px solid #ddd;">Visa Details</td>
</tr>
<?php if (!empty($data['visa_data'])): ?>
<?php foreach ($data['visa_data'] as $visa): ?>
<tr>
<td style="text-align:left; color:#6b6b6b;">
<?= esc($visa['country_name']) ?> - <?= esc($visa['visa_type_value']) ?>
(<?= date('d M Y', strtotime($visa['valid_from'])) ?> to <?= date('d M Y', strtotime($visa['valid_upto'])) ?>)
</td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td style="text-align:left; color:#6b6b6b;">No visa data available.</td>
</tr>
<?php endif; ?>
</table>
</td>
</tr>
</table>
<?php } ?>
<?php if($data['exceptional_plan_reason'] != null && $data['exceptional_plan_reason'] != ''){ ?>
<table class="invoice-content-table" style="width:100%; border-collapse:collapse; font-family:Arial, sans-serif;">
<tr>
<td style="
text-align:left;
background-color:#ffdbdb;
color:#960000;
padding:7px 15px;
font-weight:bold;
border-top-left-radius:5px;
border-top-right-radius:5px;
border-bottom:1px solid #c65e56;
">Reason for travel policy exception </td>
</tr>
<tr>
<td style="
text-align:left;
background-color:#fff5f5;
color:#960000ab;
padding:10px 15px;
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;
">
<?= esc($data['exceptional_plan_reason']) ?>
</td>
</tr>
</table>
<?php } ?>
<!--- currect status --->
<div class="invoice-table">
<table>
<tr class="quotation-heading">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Trip Type</div>
<div class="qsub-desc"><?= esc($data['trip_type_value']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Requested Date </div>
<div class="qsub-desc"><?= date('d, M y', strtotime($data['created_on'])) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Trip Start Date </div>
<div class="qsub-desc"><?= ($data['trip_start_date'] == '9999-12-31') ? '-' : date('d, M y', strtotime($data['trip_start_date'])) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Current Status</div>
<div class="qsub-desc"><?= esc($data['status_value']) ?></div>
</td>
</tr>
</table>
</div>
<table class="invoice-table-design">
<thead>
<tr>
<th class="text-left">Trip title</th>
<th class="text-left">Cost center</th>
<th class="text-left">Purpose of travel</th>
<?php if($data['functional_department'] == 5){ ?>
<th class="text-left">SO Number</th>
<?php }else{ ?>
<th class="text-left">Functional department</th>
<?php } ?>
<th class="text-left">Is Billable</h>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left"><?= esc($data['trip_title']) ?></td>
<td class="text-left"><?= esc($data['cost_center_value']) ?></td>
<td class="text-left"><?= esc($data['purpose_of_travel_value']) ?></td>
<?php if($data['functional_department'] == 5){ ?>
<td class="text-left"><?= esc($data['so_number']) ?></td>
<?php }else{ ?>
<td class="text-left"><?= esc($data['functional_department_value']) ?></td>
<?php } ?>
<td class="text-left"><?= esc($data['is_billable_value']) ?></td>
</tr>
</tbody>
</table>
<?php if (count($data['status_details'])) {
$statusHtml = '<h4 style="margin-bottom: 10px;">Trip Status:</h4>';
$statusHtml .= '<ul style="
list-style: none;
padding: 10px;
border: 1px solid #ddd;
border-radius: 6px;
background-color: #f9f9f9;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
">';
foreach ($data['status_details'] as $key => $value) {
if (isset($value['a1_status'])) {
$statusHtml .= '<li style="margin-bottom: 8px;"><strong>Approver 1:</strong> ' . $value['a1_status'] . '</li>';
}
if (isset($value['a2_status'])) {
$statusHtml .= '<li style="margin-bottom: 8px;"><strong>Approver 2:</strong> ' . $value['a2_status'] . '</li>';
}
if (isset($value['a3_status'])) {
$statusHtml .= '<li style="margin-bottom: 8px;"><strong>Approver 3:</strong> ' . $value['a3_status'] . '</li>';
}
if (isset($value['a4_status'])) {
$statusHtml .= '<li style="margin-bottom: 8px;"><strong>Approver 4:</strong> ' . $value['a4_status'] . '</li>';
}
}
$statusHtml .= '</ul>';
echo $statusHtml;
} ?>
<!--- Flight --->
<?php if(count($data['flight'])){ foreach ($data['flight'] as $key => $value) { ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="5"><strong>Flight - </strong><?= esc($value['trip_type']) ?></th>
</tr>
<?php foreach ($value['trips'] as $tripskey => $tripsvalue) { ?>
<tr class="quotation-heading <?php if(count($value['trips']) != $tripskey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">From</div>
<div class="qsub-desc"><?= esc($tripsvalue['from_place']).' ('.esc($tripsvalue['from_place_name']).')' ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">To</div>
<div class="qsub-desc"><?= esc($tripsvalue['to_place']).' ('.esc($tripsvalue['to_place_name']).')' ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($tripsvalue['date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Time</div>
<div class="qsub-desc"> <?= date('h:i A', strtotime($tripsvalue['time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Class</div>
<!-- <div class="qsub-desc"><?= esc($tripsvalue['flight_class']) ?></div> -->
<span <?php if($tripsvalue['is_this_exceptional'] == 1){ ?> style="color: #960000;" <?php } ?> ><?= esc($tripsvalue['flight_class']) ?></span> <br/>
<?php if($tripsvalue['is_this_exceptional'] == 1){ ?> <span style="font-size: 12px"> allowed for <?= $data['allowed_class']['flight'] ?> </span><?php } ?>
</td>
</tr>
<?php } ?>
</table>
</div>
<?php } } ?>
<!--- Train --->
<?php if(count($data['train'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="6"><strong>Train</strong></th>
</tr>
<?php foreach ($data['train'] as $trainkey => $trainvalue) { ?>
<tr class="quotation-heading <?php if(count($data['train']) != $trainkey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Train No</div>
<div class="qsub-desc"><?= esc($trainvalue['train_no']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">From</div>
<div class="qsub-desc"><?= esc($trainvalue['from_station']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">To</div>
<div class="qsub-desc"><?= esc($trainvalue['to_station']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($trainvalue['date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Time</div>
<div class="qsub-desc"><?= date('h:i A', strtotime($trainvalue['time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Class</div>
<span <?php if($trainvalue['is_this_exceptional'] == 1){ ?> style="color: #960000;" <?php } ?> ><?= esc($trainvalue['train_class']) ?></span> <br/>
<?php if($trainvalue['is_this_exceptional'] == 1){ ?> <span style="font-size: 12px"> allowed for <?= $data['allowed_class']['train'] ?> </span><?php } ?>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Bus --->
<?php if(count($data['bus'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="5"><strong>Bus</strong></th>
</tr>
<?php foreach ($data['bus'] as $buskey => $busvalue) { ?>
<tr class="quotation-heading <?php if(count($data['bus']) != $buskey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">From</div>
<div class="qsub-desc"><?= esc($busvalue['from']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">To</div>
<div class="qsub-desc"><?= esc($busvalue['to']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($busvalue['date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Time</div>
<div class="qsub-desc"> <?= date('h:i A', strtotime($busvalue['time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Comments</div>
<div class="qsub-desc"><?= ($busvalue['comments']) ? esc($busvalue['comments']) : '-' ?></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Taxi --->
<?php if(count($data['taxi'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="6"><strong>Taxi</strong></th>
</tr>
<?php foreach ($data['taxi'] as $taxikey => $taxivalue) { ?>
<tr class="quotation-heading <?php if(count($data['taxi']) != $taxikey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Pickup</div>
<div class="qsub-desc"><?= esc($taxivalue['location_of_pickup']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Destination</div>
<div class="qsub-desc"><?= esc($taxivalue['destination_city']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($taxivalue['date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Time</div>
<div class="qsub-desc"> <?= date('h:i A', strtotime($taxivalue['time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Car Type</div>
<div class="qsub-desc"><?= esc($taxivalue['car_type_value']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Required For</div>
<div class="qsub-desc"><?= esc($taxivalue['car_required_for_value']) ?></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Accomodation --->
<?php if(count($data['accomodation'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="5"><strong>Accomodation</strong></th>
</tr>
<?php foreach ($data['accomodation'] as $accomodationkey => $accomodationvalue) { ?>
<tr class="quotation-heading <?php if(count($data['accomodation']) != $accomodationkey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">City</div>
<div class="qsub-desc"><?= esc($accomodationvalue['destination_city']) ?></div>
</td>
<td class="quo-heading1" width="25%">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Hotel Name</div>
<div class="qsub-desc"><?= esc($accomodationvalue['hotel_name']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Checkin Date & Time</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($accomodationvalue['checkin_date'])) ?> <?= date('h:i A', strtotime($accomodationvalue['checkin_time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Checkout Date & Time</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($accomodationvalue['checkout_date'])) ?> <?= date('h:i A', strtotime($accomodationvalue['checkout_time'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;" >Category</div>
<div class="qsub-desc" >
<span <?php if($accomodationvalue['is_this_exceptional'] == 1){ ?> style="color: #960000;" <?php } ?> ><?= esc($accomodationvalue['hotel_class']) ?></span> <br/>
<?php if($accomodationvalue['is_this_exceptional'] == 1){ ?> <span style="font-size: 12px"> allowed for <?= $data['allowed_class']['hotel'] ?> </span><?php } ?>
</div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Forex --->
<?php if(count($data['forex'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="7"><strong>Forex</strong></th>
</tr>
<?php foreach ($data['forex'] as $forexkey => $forexvalue) { ?>
<tr class="quotation-heading <?php if(count($data['forex']) != $forexkey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Country</div>
<div class="qsub-desc"><?= $forexvalue['country_name'].' - '.$forexvalue['currency'] ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Duration</div>
<div class="qsub-desc"><?= esc($forexvalue['duration']).' Days' ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Perdiem</div>
<div class="qsub-desc"><?= esc($forexvalue['perdiem_amount']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Others</div>
<div class="qsub-desc"><?= ($forexvalue['transport'] + $forexvalue['accommodation'] + $forexvalue['telephone']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Total</div>
<div class="qsub-desc"><?= ($forexvalue['deposit_on_cash'] + $forexvalue['deposit_on_card']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Cash</div>
<div class="qsub-desc"><?= ($forexvalue['deposit_on_cash']) ?><br/></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Card</div>
<div class="qsub-desc"><?= ($forexvalue['deposit_on_card']) ?><br/></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Insurance --->
<?php if(count($data['insurance'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="4"><strong>Insurance</strong></th>
</tr>
<?php foreach ($data['insurance'] as $insurancekey => $insurancevalue) { ?>
<tr class="quotation-heading <?php if(count($data['insurance']) != $insurancekey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Type</div>
<div class="qsub-desc"><?= esc($insurancevalue['type_of_insurance_value']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Start Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($insurancevalue['start_date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">End Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($insurancevalue['end_date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Comments</div>
<div class="qsub-desc"><?= ($insurancevalue['comments']) ? esc($insurancevalue['comments']) : '-' ?></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Visa --->
<?php if(count($data['visa'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="4"><strong>Visa</strong></th>
</tr>
<?php foreach ($data['visa'] as $visakey => $visavalue) { ?>
<tr class="quotation-heading <?php if(count($data['visa']) != $visakey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Country</div>
<div class="qsub-desc"><?= esc($visavalue['country_name']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Type</div>
<div class="qsub-desc"><?= esc($visavalue['visa_type_value']) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Start Date</div>
<div class="qsub-desc"><?= date('d, M y', strtotime($visavalue['start_date'])) ?> </div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Comments</div>
<div class="qsub-desc"><?= ($visavalue['comments']) ? esc($visavalue['comments']) : '-' ?></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
<!--- Miscellaneous --->
<?php if(count($data['miscellaneous'])){ ?>
<div class="invoice-table services">
<table>
<tr>
<th class="text-left" colspan="2"><strong>Miscellaneous</strong></th>
</tr>
<?php foreach ($data['miscellaneous'] as $miscellaneouskey => $miscellaneousvalue) { ?>
<tr class="quotation-heading <?php if(count($data['miscellaneous']) != $miscellaneouskey+1){ echo 'border-bottom-dotted'; } ?>">
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Special Request</div>
<div class="qsub-desc"><?= esc($miscellaneousvalue['special_request_value']) ?></div>
</td>
<td class="quo-heading1">
<div class="qsub-heading" style="color: #6b7577; margin-bottom: 5px;">Comments</div>
<div class="qsub-desc"><?= ($miscellaneousvalue['comments']) ? esc($miscellaneousvalue['comments']) : '-' ?></div>
</td>
</tr>
<?php } ?>
</table></div>
<?php } ?>
</body>
</html>