?
Current Path : /home1/savoy/www/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/www/savoyglobal.net/drafthr/system/application/views/Report/outstandingstfwisexls.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php $i=1; $suminsured=0; if(!$company) $loggo='default_header.jpg'; else { foreach($company as $company) { $loggo=$company['filename']; } } $csv_output = ""; $cov=$this->mastermodel->get_data_srow('staffpersonaldetails',$search,'id'); $csv_output .= "\t\t\t\t'Outstanding Payment Report- '.$cov->name \n\n"; $csv_output .="\tSl.No \t Date \t Quotation Ref No\tType of Cover\tStatus\tPremium\t Paid Amount \t Balance"; $csv_output .="\n"; foreach($viewinfo as $updata) { $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'); } $csv_output .="\t".$i++." \t". $this->mastermodel->convdatformat($updata['quotation_date'])." \t" .$updata['quotation_ref']."\t".$cus->insured."\t".$updata['status']."\t".$updata['premium']."\t" .$updata['totalamount']."\t".($updata['premium']-$updata['totalamount']); $csv_output .="\n"; } $filename = "Outstanding_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 $csv_output; exit; ?>