File: //home/cafsindia/allyindian_com/sbltt/application/views/operation/print_trip_sheet.php
<?php
$base_url = "http://".$_SERVER['SERVER_NAME'].dirname($_SERVER["REQUEST_URI"].'?').'/';
$url = str_replace("index.php/","","$base_url");
$this->load->view('partial/print_receipt', array('print_after_sale'=>$print_after_sale, 'selected_printer'=>'invoice_printer'));
$this->load->view("partial/header");
$company = $this->config->item('company');
$address = $this->config->item('address');
$landline = $this->config->item('landline');
$phone = $this->config->item('phone');
$email = $this->config->item('email');
$website = $this->config->item('website');
$company_info = "<b>$company</b><br/>$address<br/>$landline - $phone<br/>$email<br/>$website<br/>";
/*
$from_date = date('d-m-Y',strtotime($trip_info->from_date));
$to_date = date('d-m-Y',strtotime($trip_info->to_date));
$rout_info = $trip_info->rout_info;
$vehicle_no = $trip_info->vehicle_no;
*/
$tour_no = $trip_info->tour_no;
$customer_name = $trip_info->customer_name;
$billing_name = $trip_info->billing_name;
$report_address = $trip_info->report_address;
$phone_number = $trip_info->phone_number;
$alt_number = $trip_info->alt_number;
$land_line = $trip_info->land_line;
$cust_email = $trip_info->cust_email;
$cust_address = $trip_info->cust_address;
$city = $trip_info->city;
$state = $trip_info->state;
$state_name = $trip_info->state_name;
$includ_gst = $trip_info->includ_gst;
$from_date = date('d-m-Y',strtotime($trip_info->from_date));
$to_date = date('d-m-Y',strtotime($trip_info->to_date));
$frm_city_name = $trip_info->frm_city_name;
$to_city_name = $trip_info->to_city_name;
$bus_count = $trip_info->bus_count;
$trip_days = $trip_info->trip_days;
$trip_type_name = $trip_info->trip_type_name;
$veh_type = $trip_info->veh_type;
$avg_km = $trip_info->avg_km;
$booking_amount = $trip_info->booking_amount;
$advance_amount = $trip_info->advance_amount;
$landmark = $trip_info->landmark;
$trip_details = $trip_info->trip_details;
$tax_precentage = $trip_info->tax_precentage;
$payment_type = $trip_info->payment_type;
$discount_amount = $trip_info->discount_amount;
$reporting_time = $trip_info->reporting_time;
$balance_amount = $trip_info->balance_amount;
$toll = $trip_info->toll;
$parking = $trip_info->parking;
$driver_batta = $trip_info->driver_batta;
$state_tax = $trip_info->state_tax;
$op_line_id = $trip_info->op_line_id;
$op_vehicle_id = $trip_info->op_vehicle_id;
$op_driver_id = $trip_info->op_driver_id;
$op_driver_name = $trip_info->op_driver_name;
$op_driver_number = $trip_info->op_driver_number;
$op_suspence_amt = $trip_info->op_suspence_amt;
$second_driver_id = $trip_info->second_driver_id;
$second_driver_name = $trip_info->second_driver_name;
$second_driver_number = $trip_info->second_driver_number;
$op_chk_list = $trip_info->op_chk_list;
$rout_info = $trip_info->rout_info;
$cust_rout_info = $trip_info->cust_rout_info;
$vehicle_no = $trip_info->vehicle_no;
$op_remarks = $trip_info->op_remarks;
$trip_id = "T".str_pad($op_line_id, 4, '0', STR_PAD_LEFT);
$reporting_time = date("G:i", strtotime($reporting_time)).' '.'Hrs';
//@GS 19june2018
$extra_km_amt = $tariff->extra_km_amt;
$extra = "";
if($toll === "1"){
$extra = "Toll,";
}
if($parking === "1"){
$extra .= "Parking,";
}
if($driver_batta === "1"){
$extra .= "Driver Batta,";
}
if($state_tax === "1"){
$extra .= "Other State tax";
}
$extra = rtrim($extra, ',');
if($extra === ""){
$extra = "Toll,Parking,Driver Batta,Other State tax all inclusive*";
}else{
$extra = $extra." extra*";
}
?>
<style>
table{border-collapse:collapse !important;border-spacing:0 !important;color:#000000 !important;margin: 0px auto !important;font-family:inherit;font-size:inherit !important;width: 100% !important;text-transform: none !important;}
td{padding:4px !important;height:20px;vertical-align: -webkit-baseline-middle;vertical-align: middle !important;}
td.tdclass{border: 0;padding: 8px !important; height: 20px;vertical-align: -webkit-baseline-middle; border-right: 1px solid !important; border-left: 1px solid !important;}
td.border{border:1px solid !important}
</style>
<div class="print_hide" style="text-align:right;padding: 8px;">
<a href="<?php echo base_url(); ?>index.php/operation" class="btn btn-info btn-sm", id="show_booking"><i class="fa fa-tags fa-lg" aria-hidden="true"></i> Go Back to Operation</a>
<a href="javascript:printdoc();" class="btn btn-info btn-sm", id="show_print_button"> <i class="fa fa-print fa-lg"></i> Print</a>
</div>
<div id="table_holder" style='min-height:500px;'>
<table>
<tr>
<td class='tdclass border'><img src="<?php echo base_url(); ?>/images/sbltlogo.png" alt='SBLTT Logo' height='45'/></td>
<td class='tdclass border' style='text-align:center;font-size:20px;white-space:nowrap;vertical-align: middle;font-weight:800'>Tour Trip Sheet</td>
</tr>
<tr>
<td class='tdclass border' style='vertical-align:top !important;'><?php echo $company_info ?></td>
<td class='tdclass border'>
<b>Reporting To:</b><br/>
<b><?php
echo "$billing_name<br/>$report_address<br/>$city<br/>$state_name<br/>$phone_number $alt_number $land_line<br/>$cust_email<br/>";
if($landmark !== ""){
echo "<b>Land Mark</b> : $landmark<br/>";
}
?> </b>
</td>
</tr>
<tr>
<td class='tdclass border' style="vertical-align:top !important;">
<table>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Tour No</td>
<td> : <?php echo $tour_no;?></td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Journey On</td>
<td> : <?php echo $from_date;?></td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Return On</td>
<td> : <?php echo $to_date;?></td>
</tr>
<!-- @GS 19june2018 -->
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Reporting Time</td>
<td> : <?php echo $reporting_time;?></td>
</tr>
<!-- @UDY 27JULY2018
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Trip Sheet#</td>
<td> : <?php echo $trip_id;?></td>
</tr>
-->
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Trip type</td>
<td> : <?php echo $trip_type_name;?></td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Vehicle Model</td>
<td> : <?php echo $veh_type;?></td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Vehicle#</td>
<td> : <?php echo $vehicle_no;?></td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Driver Name</td>
<td> :
<?php echo $op_driver_name;?>
<?php if($second_driver_name){ echo " / $second_driver_name"; } ?>
</td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Driver Mobile#</td>
<td> :
<?php echo $op_driver_number;?>
<?php if($second_driver_number){ echo " / $second_driver_number"; } ?>
</td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Driver Advance</td>
<td> : Rs.<?php echo $op_suspence_amt;?>/-</td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space:nowrap;'>Driver Signature</td>
<td> <br/><br/><br/></td>
</tr>
</table>
</td>
<td class='tdclass border' style='vertical-align:top !important;border-bottom:0px !important;'>
<b>Tour Rout Plan</b><br/>
<?php
echo "$cust_rout_info<br/>";
?>
</br> </br>
<b>Special Instructions</b><br/>
<?php
echo "$op_remarks<br/>";
?>
</td>
</tr>
<tr>
<td class='tdclass border' style="vertical-align:top !important;border-right:0px !important;">
<table>
<tr>
<td style='width:20%;font-weight:bold;white-space: nowrap;'>Balance Amount</td>
<td style="white-space:nowrap;"> : Rs.<?php echo $balance_amount;?>/-</td>
</tr>
<tr>
<td style='width:20%;font-weight:bold;white-space: nowrap;'>Customer Signature</td>
<td> <br/><br/><br/></td>
</tr>
</table>
</td>
<td style="padding: 0px !important;">
<table>
<tr>
<td class='tdclass border' style='white-space:nowrap;'>Check List</td>
<td class='tdclass border' style='white-space:nowrap;'>Yes / No</td>
<td class='tdclass border' style='white-space:nowrap;'>Diesel Level</td>
<td class='tdclass border' style='white-space:nowrap;'></td>
</tr>
<tr>
<td class='tdclass border' style='white-space:nowrap;'>Closing Time</td>
<td class='tdclass border' style='white-space:nowrap;'></td>
<td class='tdclass border' style='white-space:nowrap;'>Closing KM</td>
<td class='tdclass border' style='white-space:nowrap;'></td>
</tr>
<tr>
<td class='tdclass border' style='white-space:nowrap;'>Starting Time</td>
<td class='tdclass border' style='white-space:nowrap;'> </td>
<td class='tdclass border' style='white-space:nowrap;'>Starting KM</td>
<td class='tdclass border' style='white-space:nowrap;'></td>
</tr>
<tr>
<td class='tdclass border' style='white-space:nowrap;border-bottom:0px !important;'>Total Time</td>
<td class='tdclass border' style='white-space:nowrap;border-bottom:0px !important;'></td>
<td class='tdclass border' style='white-space:nowrap;border-bottom:0px !important;'>Total KM</td>
<td class='tdclass border' style="width:100px;border-bottom:0px !important;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class='tdclass border' colspan='2' style='text-align:left;font-size:11px;'> <?php echo $extra;?> Coverage KM for this trip = <?php echo $avg_km; ?> Extra per km cost for this trip = <?php echo $extra_km_amt; ?></td>
</tr>
<tr>
<td colspan='2' class='tdclass border' style='text-align:center;font-weight:bold;font-size:11px !important;'>FEEDBACK FROM CUSTOMER</td>
</tr>
<tr>
<td style="padding:0px !important;">
<table style='font-size:11px !important;'>
<tr>
<td class='tdclass border' style="border-top:0px !important;">S.No</td>
<td class='tdclass border' style="border-top:0px !important;">Quality Assessment</td>
<td class='tdclass border' style="border-top:0px !important;">Very Good</td>
<td class='tdclass border' style="border-top:0px !important;">Good</td>
<td class='tdclass border' style="border-top:0px !important;">Fair</td>
</tr>
<tr>
<td class='tdclass border'>1</td>
<td class='tdclass border' style="white-space:nowrap;">Quality of the vehicle</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
<tr>
<td class='tdclass border'>2</td>
<td class='tdclass border' style="white-space:nowrap;">TV & DVD Condition</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
<tr>
<td class='tdclass border'>3</td>
<td class='tdclass border' style="white-space:nowrap;">Seat Condition</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
<tr>
<td class='tdclass border'>4</td>
<td class='tdclass border' style="white-space:nowrap;">Driving Skills</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
<tr>
<td class='tdclass border'>5</td>
<td class='tdclass border' style="white-space:nowrap;">Behaviour of driver</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
<tr>
<td class='tdclass border'>6</td>
<td class='tdclass border' style="white-space:nowrap;">Sightseen Covered</td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
<td class='tdclass border'></td>
</tr>
</table>
</td>
<td class='tdclass border' style="border-top:0px !important;border-left:0px !important;vertical-align:top !important;font-size:11px !important;">
<b>Your Valuble suggestion / complaints</b>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
$(window).on("load", function(){
// install firefox addon in order to use this plugin
if (window.jsPrintSetup) {
<?php if (!$this->Appconfig->get('print_header')){?>
// set page header
jsPrintSetup.setOption('headerStrLeft', '');
jsPrintSetup.setOption('headerStrCenter', '');
jsPrintSetup.setOption('headerStrRight', '');
<?php
}
if (!$this->Appconfig->get('print_footer')){
?>
// set empty page footer
jsPrintSetup.setOption('footerStrLeft', '');
jsPrintSetup.setOption('footerStrCenter', '');
jsPrintSetup.setOption('footerStrRight', '');
<?php
}
?>
}
});
</script>