?
Current Path : /home1/savoy/public_html/savoyglobal.net/sibsmoved/system/application/controllers/ |
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/sibsmoved/system/application/controllers/report.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php class Report extends BaseController { function Report() { parent::BaseController(); $this->load->model('mastermodel'); $this->load->model('reportmodel'); $this->load->model('customermodel'); $this->load->model('settingsmodel'); $this->load->model('documentsmodel'); $this->load->model('policiesmodel'); $this->load->model('hrmodel'); $this->load->helper('url'); $this->load->library('Fpaginate'); } function index($menuid="",$modid="") { if(empty($modid)) { $data['modname']='Home'; } else { $mod_id=$this->mastermodel->get_data('modules',$modid,'module_id','sort'); foreach($mod_id as $id) { $modname=$id['module_name']; } $data['modname']=$modname; } if(empty ($menuid)) { $tart='index'; $data['menuname']=''; } else { $tar=$this->mastermodel->get_data('menu',$menuid,'menu_id'); foreach($tar as $target) { $tart=$target['target']; $data['menuname']=$target['caption']; } } $data['modules']=$this->settingsmodel->buildModule(); $data['menus']=$this->settingsmodel->buildMenu($modid); $this->load->view(''.$data['modname'].'/'.$tart.'',$data); } function view($type="") { if($type=='ajax') { $this->load->view('refinesearch'); } } function ajaxload($page,$table,$selectsearch="",$search="",$fromdate="",$todate="") { if($search == "") { $data['property']='view'; $data['viewinfo']=$this->mastermodel->view(''.$table.''); $data['searchinfo']= ""; $data['searchtxt']= ""; $data['searchoption']= ""; } else { $data['searchoption']=$selectsearch; $search=str_replace("~"," ",$search); $search=str_replace("_","/",$search); $data['searchtxt']=$search; $data['property']='search'; $data['selectsearch'] = $selectsearch; $data['search'] = $search; $data['searchinfo']=$this->salesmodel->get_data_search($table,$search,$selectsearch); $data['viewinfo']= ""; } $this->load->view('Report/'.$page.'',$data); } function single($table,$page,$repgen="",$selectsearch="",$search="",$fromdate="",$todate="") { $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); $this->load->view('Report/'.$page.'',$data); } function genrepclaim($table,$page,$repgen="",$selectsearch="",$search="",$fromdate="",$todate="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($selectsearch == 'selectsearch') $selectsearch = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['selectsearch']=$selectsearch; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereport($table,$selectsearch,$search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepclaimsinscompwise($table,$page,$fromdate="",$todate="",$search="",$cover_id="",$branch_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; if($branch_id == 'branch_id') $branch_id=''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generateclaiminsureport($table,$fromdate,$todate,$search,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genclientrepsales($table,$page,$repgen="",$search="",$fromdate="",$todate="",$cover_id="") { $this->load->plugin('to_pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatesalesclientreport($table,$search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genclientreprenew($table,$page,$repgen="",$search="",$fromdate="",$todate="",$cover_id="") { $this->load->plugin('to_pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generaterenewclientreport($table,$search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepclaimcov($table,$page,$repgen="",$selectsearch="",$fromdate="",$todate="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if($selectsearch == 'selectsearch') $selectsearch = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; if($cover_id=='cover_id') $cover_id=''; $data['selectsearch']=$selectsearch; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['viewinfo']=$this->reportmodel->generatereportclaimcov($table,$selectsearch,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepclaimbra($table,$page,$selectsearch="",$fromdate="",$todate="",$branch="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); if($selectsearch == 'selectsearch') $selectsearch = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['selectsearch']=$selectsearch; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['branch']=$branch; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportclaimbra($table,$selectsearch,$fromdate,$todate,$branch,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepbratarget($table,$page,$fromdate="",$todate="",$branch="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['branch']=$branch; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportbratarget($table,$fromdate,$todate,$branch,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genreplossclaim($table,$page,$repgen="",$selectsearch="",$search="",$fromdate="",$todate="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($selectsearch == 'selectsearch') $selectsearch = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; if($cover_id=='cover_id') $cover_id=''; $data['search']=$search; $data['selectsearch']=$selectsearch; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportlossclient($table,$selectsearch,$search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genreplossclaimcov($table,$page,$repgen="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if($cover_id=='cover_id') $cover_id=''; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportlossclaimcov($table,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepsalesbranchwise($table,$page,$fromdate="",$todate="",$branch="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$branch; $data['viewinfo']=$this->reportmodel->generatereportsalesbra($table,$fromdate,$todate,$branch); $this->load->view('Report/'.$page.'',$data); } function genreprenewbranchwise($table,$page,$fromdate="",$todate="",$branch="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$branch; $data['viewinfo']=$this->reportmodel->generatereportrenewbra($table,$fromdate,$todate,$branch); $this->load->view('Report/'.$page.'',$data); } function genrepsalescoverwise($table,$page,$fromdate="",$todate="",$cover_id="",$branch_id='') { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportsalescover($table,$fromdate,$todate,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepsalesinsclasswise($table,$page,$fromdate="",$todate="",$segment_id="",$branch_id='') { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$segment_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportsalesinsclass($table,$fromdate,$todate,$segment_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genreprenewcoverwise($table,$page,$fromdate="",$todate="",$cover_id="",$branch_id='') { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportrenewcover($table,$fromdate,$todate,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genreprenewinsclasswise($table,$page,$fromdate="",$todate="",$segment_id="",$branch_id='') { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$segment_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportrenewinsclass($table,$fromdate,$todate,$segment_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepsalesstfwise($table,$page,$fromdate="",$todate="",$staffid="",$cover_id="",$branch_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportsalesstf($table,$fromdate,$todate,$staffid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrephrsalaryemp($page,$fromdate="",$todate="",$staffid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['viewinfo']=$this->reportmodel->generatereporthrsalaryemp($fromdate,$todate,$staffid); $this->load->view('Report/'.$page.'',$data); } function genrepcommissionemp($page,$fromdate="",$todate="",$staffid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['viewinfo']=$this->reportmodel->generarereporthrcommissionemp($fromdate,$todate,$staffid); $this->load->view('Report/'.$page.'',$data); } function genrephrcommissionbranch($page,$fromdate="",$todate="",$branchid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$branchid; $data['viewinfo']=$this->reportmodel->generatereporthrcommissionbranch($fromdate,$todate,$branchid); $this->load->view('Report/'.$page.'',$data); } function genrephrsalarybranch($page,$fromdate="",$todate="",$branchid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$branchid; $data['viewinfo']=$this->reportmodel->generatereporthrsalarybranch($fromdate,$todate,$branchid); $this->load->view('Report/'.$page.'',$data); } function genrephrleave($table,$page,$fromdate="",$todate="",$staffid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['viewinfo']=$this->reportmodel->generatereporthrleave($table,$fromdate,$todate,$staffid); $this->load->view('Report/'.$page.'',$data); } function genrephrleavebranch($table,$page,$fromdate="",$todate="",$branchid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$branchid; $data['viewinfo']=$this->reportmodel->generatereporthrleavebranch($table,$fromdate,$todate,$branchid); $this->load->view('Report/'.$page.'',$data); } function genreprenewstfwise($table,$page,$fromdate="",$todate="",$staffid="",$cover_id="",$branch_id="") { $this->load->plugin('to_pdf'); $data['fromdate']=$fromdate; $data['todate']=$todate; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$staffid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportrenewstf($table,$fromdate,$todate,$staffid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepsalesinscompwise($table,$page,$fromdate="",$todate="",$inscompid="",$cover_id="",$branch_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$inscompid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportsalesinscomp($table,$fromdate,$todate,$inscompid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepcommissioninscompwise($table,$page,$fromdate="",$todate="",$inscompid="",$cover_id="",$branch_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$inscompid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportcommissioninscomp($table,$fromdate,$todate,$inscompid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepcustomersoa($page,$fromdate="",$todate="",$customer_id="",$payment_status='',$payment_mode='') { $this->load->plugin('to_pdf'); if ($fromdate == 'fromdate') { $fromdate = ''; } if ($todate=='todate') { $todate = ''; } if ($customer_id=='search') { $customer_id = ''; } $data['company'] = $this->mastermodel->getdatas('mycompany'); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$customer_id; $data['payment_status']=$payment_status; $data['payment_mode']=$payment_mode; $data['viewinfo']=$this->reportmodel->generatereportcustomersoa($fromdate,$todate,$customer_id,$payment_status, $payment_mode); $this->load->view('Report/'.$page.'',$data); } function genrepqcbsummary($page,$fromdate="",$todate="",$customer_id="",$payment_status='',$payment_mode='') { $this->load->plugin('to_pdf'); if ($fromdate == 'fromdate') { $fromdate = ''; } if ($todate=='todate') { $todate = ''; } if ($customer_id=='search') { $customer_id = ''; } $data['company'] = $this->mastermodel->getdatas('mycompany'); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$customer_id; $data['payment_status']=$payment_status; $data['payment_mode']=$payment_mode; $data['viewinfo']=$this->reportmodel->generatereportqcbsummary($fromdate,$todate,$customer_id,$payment_status, $payment_mode); $this->load->view('Report/'.$page.'',$data); } function genrepcoversummary($format, $year) { $this->load->plugin('to_pdf'); $data['company'] = $this->mastermodel->getdatas('mycompany'); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['year']=$year; $data['format']=$format; $data['viewinfo']=$this->reportmodel->generatereportcoversummary($year); $this->load->view('Report/coversummaryrep', $data); } function genrepinsurancecosummary($format, $year) { $this->load->plugin('to_pdf'); $data['company'] = $this->mastermodel->getdatas('mycompany'); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['year']=$year; $data['format']=$format; $data['viewinfo']=$this->reportmodel->generatereportinsurancecosummary($year); $this->load->view('Report/insurancecosummaryrep', $data); } function genrepcompanypayment($page,$fromdate="",$todate="",$date_filter="",$customer_id="",$insurance_company_id="",$payment_status='',$payment_completed='') { $this->load->plugin('to_pdf'); if ($fromdate == 'fromdate') { $fromdate = ''; } if ($todate=='todate') { $todate = ''; } if ($customer_id=='search') { $customer_id = ''; } $data['company'] = $this->mastermodel->getdatas('mycompany'); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['customer_id']=$customer_id; $data['payment_status']=$payment_status; $data['date_filter']=$date_filter; $data['payment_completed']=$payment_completed; $data['insurance_company_id']=$insurance_company_id; $data['viewinfo']=$this->reportmodel->generatereportcompanypayment($fromdate,$todate,$date_filter,$customer_id,$insurance_company_id,$payment_status, $payment_completed); $this->load->view('Report/'.$page.'',$data); } function genrepcustomersummary($page,$fromdate="",$todate="") { if ($fromdate == 'fromdate') { $fromdate = ''; } if ($todate=='todate') { $todate = ''; } $data['fromdate']=$fromdate; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['page']=$page; $data['viewinfo']=$this->reportmodel->generatereportcustomersummary($fromdate,$todate); $this->load->view('Report/customersummaryrep',$data); } function genrepcustomerreceipt($page,$fromdate="",$todate="",$payment_method="0",$format='view') { if ($fromdate == 'fromdate') { $fromdate = ''; } if ($todate=='todate') { $todate = ''; } $data['fromdate']=$fromdate; $data['todate']=$todate; $data['payment_method']=$payment_method; $data['format']=$format; $data['viewinfo']=$this->reportmodel->genrepcustomerreceipt($fromdate,$todate,$payment_method); // var_dump($data);die(); $this->load->view('Report/customerreceiptrep',$data); } function genrepageingsummary($page) { ini_set("memory_limit", "1024M"); $data['page']=$page; $data['viewinfo']=$this->reportmodel->generatereportageingsummary(); $this->load->view('Report/ageingsummaryrep',$data); } function genreprenewinscompwise($table,$page,$fromdate="",$todate="",$inscompid="",$cover_id="",$branch_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$inscompid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportrenewinscomp($table,$fromdate,$todate,$inscompid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepbrostfwise($table,$page,$fromdate="",$todate="",$staffid="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['viewinfo']=$this->reportmodel->generatereportbrostf($table,$fromdate,$todate,$staffid); $this->load->view('Report/'.$page.'',$data); } function genrepplastfwise($table,$page,$fromdate="",$todate="",$staffid="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['todate']=$todate; $data['search']=$staffid; $data['viewinfo']=$this->reportmodel->generatereportplastf($table,$fromdate,$todate,$staffid); $this->load->view('Report/'.$page.'',$data); } function genrepplainscompwise($table,$page,$fromdate="",$todate="",$insurance_company_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$insurance_company_id; $data['viewinfo']=$this->reportmodel->generatereportplainscomp($table,$fromdate,$todate,$insurance_company_id); $this->load->view('Report/'.$page.'',$data); } function genrepbroinscompwise($table,$page,$fromdate="",$todate="",$insurance_company_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$insurance_company_id; $data['viewinfo']=$this->reportmodel->generatereportbroinscomp($table,$fromdate,$todate,$insurance_company_id); $this->load->view('Report/'.$page.'',$data); } function genrepbrobranchwise($table,$page,$fromdate="",$todate="",$branch_id="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportbrobranch($table,$fromdate,$todate,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genreppaymentclient($page,$search="",$fromdate="",$todate="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; if($cover_id=='cover_id') $cover_id=''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportpaymentclient($search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genreppaymentcover($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportpaymentcover($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genreppaymentstf($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportpaymentstf($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genreppaymentinscomp($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportpaymentinscomp($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genrepoutstandingclient($page,$search="",$fromdate="",$todate="",$cover_id="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; if($cover_id=='cover_id') $cover_id=''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['cover_id']=$cover_id; $data['viewinfo']=$this->reportmodel->generatereportoutstandingclient($search,$fromdate,$todate,$cover_id); $this->load->view('Report/'.$page.'',$data); } function genrepoutstandingcover($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportoutstandingcover($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genrepoutstandingstf($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportoutstandingstaff($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genrepoutstandinginscomp($page,$search="",$fromdate="",$todate="") { $this->load->library('cezpdf'); $this->load->helper('pdf'); $data['segment']=$this->mastermodel->getdatas('segment_insurances'); $data['cover_insurance']=$this->mastermodel->getdatas('covers'); if ($search == "search") $search = ''; if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['search']=$search; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['viewinfo']=$this->reportmodel->generatereportoutstandinginscomp($search,$fromdate,$todate); $this->load->view('Report/'.$page.'',$data); } function genrepleadsstfwise($table,$page,$fromdate,$todate,$staffid,$cover_id,$branch_id) { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['cover_id']=$cover_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportleadsstf($table,$fromdate,$todate,$staffid,$cover_id,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepleadsbranchwise($table,$page,$fromdate="",$todate="",$branch="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$branch; $data['viewinfo']=$this->reportmodel->generatereportleadsbra($table,$fromdate,$todate,$branch); $this->load->view('Report/'.$page.'',$data); } function genreptargetbranchwise($table,$page,$fromdate="",$todate="",$branch="",$selected_covers="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$branch; $data['selected_cover'] = $selected_covers; $data['viewinfo']=$this->reportmodel->generatereporttargetbra($table,$fromdate,$todate,$branch,$selected_covers); $this->load->view('Report/'.$page.'',$data); } function genreptargetempwise($table,$page,$fromdate="",$todate="",$staffid='',$selected_covers="") { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['fromdate']=$fromdate; $data['todate']=$todate; $data['company']=$this->mastermodel->getdatas('mycompany'); $data['footer_report']=$this->reportmodel->getfootervalue(); $data['search']=$staffid; $data['selected_cover'] = $selected_covers; $data['viewinfo']=$this->reportmodel->generatereporttargetempwise($table,$fromdate,$todate,$staffid,$selected_covers); $this->load->view('Report/'.$page.'',$data); } function genrepdailyactivitybranch($table,$page,$fromdate,$todate,$branch_id) { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$branch_id; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportdailyactivitybranch($table,$fromdate,$todate,$branch_id); $this->load->view('Report/'.$page.'',$data); } function genrepdailyactivity($table,$page,$fromdate,$todate,$staffid,$branch_id) { $this->load->plugin('to_pdf'); if($fromdate == 'fromdate') $fromdate = ''; if($todate=='todate') $todate = ''; $data['footer_report']=$this->reportmodel->getfootervalue(); $data['company']=$this->mastermodel->getdatas('mycompany'); $data['fromdate']=$fromdate; $data['todate']=$todate; $data['search']=$staffid; $data['branch_id']=$branch_id; $data['viewinfo']=$this->reportmodel->generatereportdailyactivity($table,$fromdate,$todate,$staffid,$branch_id); $this->load->view('Report/'.$page.'',$data); } function headers() { $this->load->library('cezpdf'); $this->load->helper('pdf'); prep_pdf(); // creates the footer for the document we are creating. $db_data[] = array('name' => 'Jon Doe', 'phone' => '111-222-3333', 'email' => 'jdoe@someplace.com'); $db_data[] = array('name' => 'Jane Doe', 'phone' => '222-333-4444', 'email' => 'jane.doe@something.com'); $db_data[] = array('name' => 'Jon Smith', 'phone' => '333-444-5555', 'email' => 'jsmith@someplacepsecial.com'); $col_names = array( 'name' => 'Name', 'phone' => 'Phone Number', 'email' => 'E-mail Address' ); $this->cezpdf->ezTable($db_data, $col_names, 'Contact List', array('width'=>550)); $this->cezpdf->ezStream(); } function listSearchagent($pagenum,$searchBy="",$staffname="") { //echo 'page no:'. $pagenum .' Searchby:'. $searchBy.' valuie:'.$staffname; $data['per_page']=6; if($pagenum!=1) { $data['id']=($pagenum-1) * $data['per_page']+1; } else { $data['id']=1; } $data['searchBy']=$searchBy; $data['currentpage']=$pagenum; $data['custname']=$staffname; $counts=$this->documentsmodel->count_alls('staffpersonaldetails','id',''); if($counts==0) { $data['Maxpage']=1; } else{ $data['Maxpage']=ceil($counts/$data['per_page']); } $data['viewinfo']=$this->hrmodel->agentlistpagination($pagenum, $data['per_page'],$staffname,$searchBy); $this->load->view('Sales/loadstafflist',$data); } function listSearchemployee($pagenum,$searchBy="",$staffname="") { //echo 'page no:'. $pagenum .' Searchby:'. $searchBy.' valuie:'.$staffname; $data['per_page']=6; if($pagenum!=1) { $data['id']=($pagenum-1) * $data['per_page']+1; } else { $data['id']=1; } $data['searchBy']=$searchBy; $data['currentpage']=$pagenum; $data['custname']=$staffname; $counts=$this->documentsmodel->count_alls('staffpersonaldetails','id',''); if($counts==0) { $data['Maxpage']=1; } else{ $data['Maxpage']=ceil($counts/$data['per_page']); } $data['viewinfo']=$this->hrmodel->emponlypagination($pagenum, $data['per_page'],$staffname,$searchBy); $this->load->view('Sales/loadstafflist',$data); } function load_report_list($report_type,$page) { $data['viewinfo'] = $this->reportmodel->load_report_list($report_type); $this->load->view('Report/' .$page ,$data); } }