File: /var/www/html/taxicamera/application/views/admin/report/income_report/income_report_pdf.php
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Punjab Motors</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<style>
.content_part {
width: 70%;
margin: 0 auto;
font-family: 'Open Sans', sans-serif;
}
.header_part {
text-align: center;
}
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-family: Verdana,' sans-serif';">
<tbody>
<tr>
<td align="center" style="padding: 10px;"><img src="./public/images/logo_pdf.png"></td>
</tr>
<tr>
<td align="center">
<h4 style="margin: 0;padding: 3px 0;">24 Graham Rd Clayton South , VIC-3169 Australia</h4>
<h4 style="margin: 0;padding: 3px 0;">Ph: +61 3 9540 8998</h4>
<h4 style="margin: 0;padding: 3px 0;">Email: punjabmotor@hotmail.com</h4>
</td>
</tr>
<tr>
<td style="padding: 20px 0 30px 0;">
<h4 style="margin: 0 0 15px 0;padding: 3px 0; text-align: center ">Income Report</h4>
<table border="0" width="100%" cellpadding="0" cellspacing="0" style="border-top: #ddd 1px solid; border-right: #ddd 1px solid;">
<tr>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong>Period</strong></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= (!empty($start_date))?$start_date : (isset($income_list[0]['payin_date'])?$income_list[0]['payin_date'] : date('01/01/Y'));?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong>Till</strong></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">
<?= (!empty($end_date))?$end_date : (isset($income_list[0]['payin_date'])?$income_list[count($income_list) - 1]['payin_date'] : date('d/m/Y'));?>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-top: #ddd 1px solid; border-right: #ddd 1px solid;">
<thead>
<tr>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">SL No.</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Payment date</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Car No.</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Shift No</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Levy Count</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Meter Total</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Fuel</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Other Expenses</th>
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Driver Commission</th>
<!-- <th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Owner Income </th> -->
<th align="center" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px">Lifting Fees </th>
</tr>
</thead>
<tbody>
<?php
if(!empty($income_list)){$total_levy =0;$total_metered_fares = $total_expense_total_fuel = $total_expense_total_other= $total_driver_commission_amt = $total_owner_commission_amt= $total_total_lifting_fees = 0;
foreach ($income_list as $key => $income) {?>
<tr>
<?php
$driver_commission_amt = $owner_commission_amt = 0;
if ($income['driver_commission_share'] && $income['owner_commission_share']) {
$driver_commission_amt = $income['metered_fares'] * $income['driver_commission_share'] / 100;
$owner_commission_amt = $income['metered_fares'] * $income['owner_commission_share'] / 100;
}
else{
$driver_commission_amt = 0;
$owner_commission_amt = $income['metered_fares'];
}
?>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $key + 1 ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['payin_date'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['registration_no'] ?></td>
<?php /* if($income['shift_name'] == "D"){
$shift_name = "Day";
}
else if($income['shift_name'] == "H"){
$shift_name = "Hungry";
}
else{
$shift_name = "Night";
}*/
?>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['shift_no'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['levy'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['metered_fares'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['expense_total_fuel'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['expense_total_other'] ?></td>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $driver_commission_amt ?></td>
<!-- <td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $owner_commission_amt ?></td> -->
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><?= $income['total_lifting_fees'] ?></td>
<?php
$total_levy +=$income['levy'];
$total_metered_fares +=$income['metered_fares'];
$total_expense_total_fuel +=$income['expense_total_fuel'];
$total_expense_total_other +=$income['expense_total_other'];
$total_driver_commission_amt +=$driver_commission_amt;
//$total_owner_commission_amt +=$owner_commission_amt;
$total_total_lifting_fees +=$income['total_lifting_fees'];
?>
</tr>
<?php } ?>
<tr>
<td colspan="4" align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong>TOTAL</strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_levy,2)?></strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_metered_fares,2)?></strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_expense_total_fuel,2)?></strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_expense_total_other,2)?></strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_driver_commission_amt,2)?></strong></td>
<td align="left" style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px"><strong><?=number_format($total_total_lifting_fees,2)?></strong></td>
</tr>
<?php } else { ?>
<tr>
<td style="border-bottom: #ddd 1px solid; border-left: #ddd 1px solid; padding: 10px" colspan ="11">No Data Available</td>
</tr>
<?php } ?>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>