?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Report/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/Report/brostfwisexls.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php $cov=$this->mastermodel->get_data_srow('staffpersonaldetails',$search,'id'); $stf=$this->mastermodel->get_data_srow('staffpersonaldetails',$search,'id'); $branchname = $this->mastermodel->get_newbranchname($search); $html=''; $html='<html><head><body style="margin: 20px 20px 30px 20px;"> <div style="text-align:center"><b><u>BROKING SLIP REPORT</u></b> </div><br/><br/>'; $html.=" <table class='reportheader'> <tr><td>Employee Name:</td><td>$cov->name</td></tr> <tr> <td>Employee No:</td><td>$cov->employeeid</td></tr> <tr><td>Branch:</td><td>$branchname</td></tr> <tr><td>Period:</td><td>"; if ($todate != 'todate'){ $html .= "$fromdate to $todate"; } $html.="</td> </tr> </table> <table width='90%' class='sort' border='1' cellpadding='1' cellspacing='-1'><thead><tr> <th style='background-color:#80C0FF;'>Sl No</th> <th style='background-color:#80C0FF;'>Date</th> <th style='background-color:#80C0FF;'>Customer Name</th> <th style='background-color:#80C0FF;'>Type of Cover</th> <th style='background-color:#80C0FF;'>Quotation Ref No</th> <th style='background-color:#80C0FF;'>Status</th> </tr></thead>"; $i=0; foreach($viewinfo as $updata) { $stf=$this->mastermodel->get_data_srow('covers',$updata['cover_id'],'id'); $type=$this->customermodel->getSingleFieldValue('customers','type','id',$updata['customer_id']); if($type=="Individual") { $cus=$this->mastermodel->get_data_srow('customer_personal_ind',$updata['customer_id'],'customer_id'); } else { $cus=$this->mastermodel->get_data_srow('customer_corp_info',$updata['customer_id'],'customer_id'); } $i++; $html.=" <tr> <td>".$i."</td> <td>".$this->mastermodel->convdatformat($updata['quotation_date'])."</td> <td>$cus->insured</td> <td>$stf->cover</td> <td>".$updata['quotation_ref']."</td> <td>".$updata['status']."</td> </tr>"; ?> <?php } $html .= "</table>"; $html.='</body></head></html>'; //echo $html; $filename = "Report_".date("Y-m-d_H-i",time()); header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=".$filename.".xls"); header("Pragma: no-cache"); header("Expires: 0"); print $html; exit; ?>