Inactive campaign related files
Showing
4 changed files
with
285 additions
and
127 deletions
| 1 | <?php | 1 | <?php |
| 2 | $client=Input::get("client"); | 2 | $client=Input::get("client"); |
| 3 | $status=Input::get("status"); | ||
| 4 | $campaignstartdate=Input::get("campaignstartdate"); | ||
| 5 | $campaignenddate=Input::get("campaignenddate"); | ||
| 6 | |||
| 3 | $monthworkdays=base64_encode(Input::get("monthworkdays")); | 7 | $monthworkdays=base64_encode(Input::get("monthworkdays")); |
| 4 | $agencyfeesvalue=base64_encode(Input::get("agencyfeesvalue")); | 8 | $agencyfeesvalue=base64_encode(Input::get("agencyfeesvalue")); |
| 5 | $agencyfeefunction=base64_encode(Input::get("agencyfeefunction")); | 9 | $agencyfeefunction=base64_encode(Input::get("agencyfeefunction")); |
| ... | @@ -73,9 +77,15 @@ $mvalue.="developerparam~$developerparam|"; | ... | @@ -73,9 +77,15 @@ $mvalue.="developerparam~$developerparam|"; |
| 73 | 77 | ||
| 74 | $mvalue.="trackerfields~$trackerfields|"; | 78 | $mvalue.="trackerfields~$trackerfields|"; |
| 75 | 79 | ||
| 76 | if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company';"); | 80 | //if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company';"); |
| 81 | //if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company', status='$status';"); | ||
| 82 | |||
| 83 | if($wakka->getCount("hrms_masters","mkey='$client' and mtype='company'")==0)$companyarr=$wakka->Query("insert into hrms_masters set mvalue='',mkey='$client',mtype='company', status='$status' ,campaignstartdate='$campaignstartdate', campaignenddate='$campaignenddate';"); | ||
| 84 | |||
| 85 | //$companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$client' and mtype='company';"); | ||
| 86 | //$companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue', status='$status' where mkey='$client' and mtype='company';"); | ||
| 77 | 87 | ||
| 78 | $companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue' where mkey='$client' and mtype='company';"); | 88 | $companyarr=$wakka->Query("update hrms_masters set mvalue='$mvalue', status='$status', campaignstartdate='$campaignstartdate', campaignenddate='$campaignenddate' where mkey='$client' and mtype='company';"); |
| 79 | 89 | ||
| 80 | //if(!Auth::user()->moduleACL("Admin",true,true,true))$wakka->createMailQueue("system",$wakka->getEmailIdsFromList('HRManagerUsers'),Config::get("app.name").": Client Master Changed","[".$wakka->GetUserName()."] Has changed Clients [$client] Master Data"); | 90 | //if(!Auth::user()->moduleACL("Admin",true,true,true))$wakka->createMailQueue("system",$wakka->getEmailIdsFromList('HRManagerUsers'),Config::get("app.name").": Client Master Changed","[".$wakka->GetUserName()."] Has changed Clients [$client] Master Data"); |
| 81 | echo "<div class='message success close'><h2>Success!</h2><p>Data Saved</p></div>"; | 91 | echo "<div class='message success close'><h2>Success!</h2><p>Data Saved</p></div>"; | ... | ... |
| ... | @@ -4,10 +4,13 @@ if(Input::has('addcompany')) | ... | @@ -4,10 +4,13 @@ if(Input::has('addcompany')) |
| 4 | $company=trim(Input::get("addcompany")); | 4 | $company=trim(Input::get("addcompany")); |
| 5 | if($company!="") | 5 | if($company!="") |
| 6 | { | 6 | { |
| 7 | $companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company'"); | 7 | //$companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company'"); |
| 8 | $companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company' and status='active'"); | ||
| 8 | if(!$companyarr) | 9 | if(!$companyarr) |
| 9 | { | 10 | { |
| 10 | $wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company';"); | 11 | //$wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company';"); |
| 12 | //$wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company',status='active';"); | ||
| 13 | $wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company',status='active', campaignstartdate='$campaignstartdate', campaignenddate='$campaignenddate';"); | ||
| 11 | } | 14 | } |
| 12 | } | 15 | } |
| 13 | 16 | ||
| ... | @@ -45,8 +48,18 @@ foreach($workflowarr as $wfline) | ... | @@ -45,8 +48,18 @@ foreach($workflowarr as $wfline) |
| 45 | if($client!="") | 48 | if($client!="") |
| 46 | { | 49 | { |
| 47 | $mastersdata=$wakka->getCompanyMaster($client); | 50 | $mastersdata=$wakka->getCompanyMaster($client); |
| 51 | $mastersdata["status"] = ucfirst($mastersdata["status"]); | ||
| 48 | 52 | ||
| 49 | echo "<br>"; | 53 | echo "<br>"; |
| 54 | echo "<p><label class='label-small_new' style='width:15%'>Status:</label><select class='form_hrm_select' name=status id=status> | ||
| 55 | <option value='".($mastersdata["status"])."'>".($mastersdata["status"])."</option> | ||
| 56 | <option value=active>Active</option> | ||
| 57 | <option value=inactive>Inactive</option> | ||
| 58 | </select></p>"; | ||
| 59 | |||
| 60 | echo "<p><label class='label-small_new' style='width:15%'>Campaign Start Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignstartdate id=campaignstartdate value='".($mastersdata["campaignstartdate"])."'></p>"; | ||
| 61 | echo "<p><label class='label-small_new' style='width:15%'>Campaign End Date :</label><input type=text class='form_new form_new_amend datetimepicker' name=campaignenddate id=campaignenddate value='".($mastersdata["campaignenddate"])."'></p>"; | ||
| 62 | |||
| 50 | echo "<p><label class='label-small_new' style='width:15%'>Contract Start Date :</label><input type=text class='form_new form_new_amend' name=contractstartdate id=contractstartdate value='".($mastersdata["contractstartdate"])."'></p>"; | 63 | echo "<p><label class='label-small_new' style='width:15%'>Contract Start Date :</label><input type=text class='form_new form_new_amend' name=contractstartdate id=contractstartdate value='".($mastersdata["contractstartdate"])."'></p>"; |
| 51 | echo "<p><label class='label-small_new' style='width:15%'>Contract End Date :</label><input type=text class='form_new form_new_amend' name=contractenddate id=contractenddate value='".($mastersdata["contractenddate"])."'></p>"; | 64 | echo "<p><label class='label-small_new' style='width:15%'>Contract End Date :</label><input type=text class='form_new form_new_amend' name=contractenddate id=contractenddate value='".($mastersdata["contractenddate"])."'></p>"; |
| 52 | 65 | ||
| ... | @@ -120,7 +133,9 @@ foreach($trackerfieldsarr as $key)$optionsstr.="<option value='$key' selected>$t | ... | @@ -120,7 +133,9 @@ foreach($trackerfieldsarr as $key)$optionsstr.="<option value='$key' selected>$t |
| 120 | foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>"; | 133 | foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>"; |
| 121 | ?> | 134 | ?> |
| 122 | <script> | 135 | <script> |
| 123 | 136 | $('body').on('focus',".datetimepicker", function(){ | |
| 137 | $(this).datetimepicker({format: 'HH:mm'}); | ||
| 138 | }); | ||
| 124 | $(document).ready(function(){ | 139 | $(document).ready(function(){ |
| 125 | 140 | ||
| 126 | }); | 141 | }); | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | // phpinfo(); | ||
| 3 | |||
| 4 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); | 2 | $kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]); |
| 5 | 3 | ||
| 6 | //error_reporting(E_ALL); | 4 | //error_reporting(E_ALL); |
| 7 | ini_set("memory_limit", -1); | 5 | ini_set("memory_limit", -1); |
| 8 | 6 | ||
| 9 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); | 7 | include_once(app_path().'/lib/phpexcel/PHPExcel.php'); |
| 10 | include_once(app_path().'/lib/PHP_XLSXWriter-master/xlsxwriter.class.php'); | ||
| 11 | |||
| 12 | |||
| 13 | $wakka->setUserTimezone(); | 8 | $wakka->setUserTimezone(); |
| 14 | $themehome=$wakka->GetThemePath('/'); | 9 | $themehome=$wakka->GetThemePath('/'); |
| 15 | $sindex[0]='salbasic'; | 10 | $sindex[0]='salbasic'; |
| 16 | $sindex[1]='salhouserent'; | 11 | $sindex[1]='salhouserent'; |
| 17 | $sindex[2]='saltransport'; | 12 | $sindex[2]='saltransport'; |
| 18 | $sindex[3]='salfood'; | 13 | $sindex[3]='salfood'; |
| 19 | $sindex[4]='saltelephone'; | 14 | $sindex[4]='saltelephone'; |
| 20 | $sindex[5]='salmedical'; | 15 | $sindex[5]='salmedical'; |
| 21 | $sindex[6]='salelectricity'; | 16 | $sindex[6]='salelectricity'; |
| 22 | $sindex[7]='salother'; | 17 | $sindex[7]='salother'; |
| 23 | $sindex[8]='saltotal'; | 18 | $sindex[8]='saltotal'; |
| 24 | $sindex[9]='nettotal';$kformlib->HRFieldNames['nettotal']="Net Salary"; | 19 | $sindex[9]='nettotal';$kformlib->HRFieldNames['nettotal']="Net Salary"; |
| 25 | 20 | ||
| 26 | if(Input::has("reportsubmit")) | 21 | if(Input::has("reportsubmit")) |
| 27 | { | 22 | { |
| ... | @@ -68,44 +63,38 @@ if(Input::has("reportsubmit")) | ... | @@ -68,44 +63,38 @@ if(Input::has("reportsubmit")) |
| 68 | if(!empty($datesdiffstr)) | 63 | if(!empty($datesdiffstr)) |
| 69 | { | 64 | { |
| 70 | $ddprts=explode(",",$datesdiffstr);//datesdiffstr=servicestoppeddate,joiningdate,LT,180 ==> if(servicestopdate-joiningdate < 180) then ok,else not ok | 65 | $ddprts=explode(",",$datesdiffstr);//datesdiffstr=servicestoppeddate,joiningdate,LT,180 ==> if(servicestopdate-joiningdate < 180) then ok,else not ok |
| 71 | } | 66 | } |
| 72 | |||
| 73 | |||
| 74 | // $finputarr=Input::get("fieldsarr"); | ||
| 75 | $finputarr=$_POST["fieldsarr"]; | ||
| 76 | array_unshift($finputarr,'id'); | ||
| 77 | |||
| 78 | $selectedfields=$_POST["selectedfields"]; | ||
| 79 | array_unshift($selectedfields,'EmpID'); | ||
| 80 | |||
| 81 | 67 | ||
| 82 | 68 | ||
| 83 | if(is_array($finputarr))foreach($finputarr as $eachfield)$fieldsarr[]=$eachfield; | 69 | //$finputarr=Input::get("fieldsarr"); |
| 84 | else {echo "Please Select List of fields In report.";return;} | 70 | $finputarr=$_REQUEST['fieldsarr']; |
| 71 | if(is_array($finputarr))foreach($finputarr as $eachfield)$fieldsarr[]=$eachfield; | ||
| 72 | else {echo "Please Select List of fields In report.";return;} | ||
| 85 | 73 | ||
| 86 | $reporttype=Input::get("reporttype"); | 74 | $reporttype=Input::get("reporttype"); |
| 87 | $outputtype=Input::get("outputtype","XLS"); | 75 | $outputtype=Input::get("outputtype","XLS"); |
| 88 | 76 | ||
| 89 | if(sizeof($fieldsarr)==0){echo "Please Select List of fields In report.";return;} | 77 | if(sizeof($fieldsarr)==0){echo "Please Select List of fields In report.";return;} |
| 90 | if($client==""&&$currentstatus==""&&$visacompany==''&&$modfrom[0]==''&&$crefrom[0]==''&&$empid==''&&$fieldbyrange==''){echo $client."Please Select atleast one of Client or Status or ModifyFrom or CreatedFrom.";return;} | 78 | if($reporttype==""){echo "Please Select a Report Type.";return;} |
| 79 | if($client==""&&$currentstatus==""&&$visacompany==''&&$modfrom[0]==''&&$crefrom[0]==''&&$empid==''&&$fieldbyrange==''){echo $client."Please Select atleast one of Client or Status or ModifyFrom or CreatedFrom.";return;} | ||
| 91 | 80 | ||
| 92 | if($reporttype=='Binary')$reporttype='|b'; | 81 | if($reporttype=='Binary')$reporttype='|b'; |
| 93 | if($reporttype=='History')$reporttype='|h'; | 82 | if($reporttype=='History')$reporttype='|h'; |
| 94 | if($reporttype=='Values')$reporttype=''; | 83 | if($reporttype=='Values')$reporttype=''; |
| 95 | 84 | ||
| 96 | 85 | ||
| 97 | $filterstr=array(); | 86 | $filterstr=array(); |
| 98 | 87 | ||
| 99 | if($empid!="") | 88 | if($empid!="") |
| 100 | { | 89 | { |
| 101 | $idarr=explode(',',$empid); | 90 | $idarr=explode(',',$empid); |
| 102 | foreach($idarr as $tid)if(trim($tid)!='')$tarr[]="'$tid'"; | 91 | foreach($idarr as $tid)if(trim($tid)!='')$tarr[]="'$tid'"; |
| 103 | $empid=implode(",",$tarr); | 92 | $empid=implode(",",$tarr); |
| 104 | 93 | ||
| 105 | $filterstr[]=" id in ($empid) "; | 94 | $filterstr[]=" id in ($empid) "; |
| 106 | } | 95 | } |
| 107 | else | 96 | else |
| 108 | { | 97 | { |
| 109 | if($client!=""){$filterstr[]=getQueryFromList('client',$client);} | 98 | if($client!=""){$filterstr[]=getQueryFromList('client',$client);} |
| 110 | if($currentstatus!=""){$filterstr[]=getQueryFromList('currentstatus',$currentstatus);} | 99 | if($currentstatus!=""){$filterstr[]=getQueryFromList('currentstatus',$currentstatus);} |
| 111 | // if($visacompany!=""){$filterstr[]=getQueryFromList('visacompany',$visacompany);} | 100 | // if($visacompany!=""){$filterstr[]=getQueryFromList('visacompany',$visacompany);} |
| ... | @@ -119,80 +108,161 @@ else | ... | @@ -119,80 +108,161 @@ else |
| 119 | { | 108 | { |
| 120 | $filterstr[]=" modified>='".date('Y-m-d 00:00:00',$frcrefrom)."' "; | 109 | $filterstr[]=" modified>='".date('Y-m-d 00:00:00',$frcrefrom)."' "; |
| 121 | } | 110 | } |
| 122 | } | 111 | } |
| 123 | $type = PHPExcel_Cell_DataType::TYPE_STRING; | 112 | $type = PHPExcel_Cell_DataType::TYPE_STRING; |
| 124 | |||
| 125 | if(!empty($filterstr))$filterstr=implode(" and ",$filterstr);else $filterstr=""; | ||
| 126 | 113 | ||
| 127 | if($filterstr=="")$filterstr="1"; | 114 | if(!empty($filterstr))$filterstr=implode(" and ",$filterstr);else $filterstr=""; |
| 128 | 115 | ||
| 129 | $savereportname=Input::get("savereportname"); | 116 | if($filterstr=="")$filterstr="1"; |
| 130 | 117 | ||
| 131 | if($savereportname!="") | 118 | $savereportname=Input::get("savereportname"); |
| 132 | { | 119 | if($savereportname!="") |
| 120 | { | ||
| 133 | $userreports=$wakka->GetBBBUserData("UserSavedReports"); | 121 | $userreports=$wakka->GetBBBUserData("UserSavedReports"); |
| 134 | $userreports[$savereportname]=base64_encode(json_encode(Input::all())); | 122 | $userreports[$savereportname]=base64_encode(json_encode(Input::all())); |
| 135 | $wakka->SetBBBUserData("UserSavedReports",$userreports); | 123 | $wakka->SetBBBUserData("UserSavedReports",$userreports); |
| 136 | } | 124 | } |
| 137 | $usersarr=$wakka->getPersonsdownloadreport($filterstr); | ||
| 138 | |||
| 139 | foreach($usersarr as $r => $userdata) | ||
| 140 | { | ||
| 141 | $ppldata[]=unserialize($userdata['peopledata']); | ||
| 142 | } | ||
| 143 | 125 | ||
| 144 | // dd($ppldata); | 126 | $usersarr=$wakka->getPersons($filterstr); |
| 145 | for ($i=0; $i <count($ppldata) ; $i++) { | ||
| 146 | 127 | ||
| 147 | for ($j=0; $j <count($finputarr) ; $j++) { | 128 | $inputFileType = "Excel5"; |
| 148 | if ($ppldata[$i] != false){ | 129 | $objReader = PHPExcel_IOFactory::createReader($inputFileType); |
| 130 | $objPHPExcel = $objReader->load("$themehome/uploads/sreports/blank.xls"); | ||
| 131 | $baseRow = 3; | ||
| 132 | $highestColumn = sizeof($fieldsarr); | ||
| 149 | 133 | ||
| 150 | if (array_key_exists ($finputarr[$j], $ppldata[$i])) { | 134 | $baserowArr=$fieldsarr; |
| 135 | $objPHPExcel->getActiveSheet()->setCellValue("A1", "id"); | ||
| 136 | for ($head = 0; $head < $highestColumn; $head++){ | ||
| 137 | $colstr=PHPExcel_Cell::stringFromColumnIndex($head+1); | ||
| 138 | $objPHPExcel->getActiveSheet()->setCellValue($colstr."1", $baserowArr[$head]); | ||
| 139 | } | ||
| 151 | 140 | ||
| 152 | $usersdata[$i][$finputarr[$j]]=$ppldata[$i][$finputarr[$j]]; | 141 | $objPHPExcel->getActiveSheet()->setCellValue("A2", "EMPID"); |
| 142 | for ($head = 0; $head < $highestColumn; $head++){ | ||
| 143 | $colstr=PHPExcel_Cell::stringFromColumnIndex($head+1); | ||
| 144 | $objPHPExcel->getActiveSheet()->setCellValue($colstr."2", $kformlib->HRFieldNames[$baserowArr[$head]]); | ||
| 145 | } | ||
| 153 | 146 | ||
| 154 | }else if (! array_key_exists ($finputarr[$j], $ppldata[$i])) | 147 | $skippedrows=0; |
| 148 | foreach($usersarr as $r => $userdata) | ||
| 155 | { | 149 | { |
| 156 | $usersdata[$i][$finputarr[$j]] = ""; | 150 | $ppldata=unserialize($userdata['peopledata']); |
| 151 | $logarr=unserialize($userdata['modifylog']); | ||
| 152 | |||
| 157 | 153 | ||
| 154 | $hrexclusiveflag=0;if(empty($ppldata['client']))$ppldata['client']='__'; | ||
| 155 | if(strstr($wakka->HRCoreVars['HRExclusiveClients'],$ppldata['client'])) | ||
| 156 | { | ||
| 157 | if(!$wakka->IsAdmin()) | ||
| 158 | { | ||
| 159 | if(!strstr($wakka->getManagerUsers($wakka->getUserListforClient($ppldata['client'])),$wakka->GetUserName())) | ||
| 160 | { | ||
| 161 | if(!strstr($wakka->GetBBBUserData("clientsownerlist"),$ppldata['client']))$hrexclusiveflag=1; | ||
| 158 | } | 162 | } |
| 159 | } | 163 | } |
| 160 | } | 164 | } |
| 161 | 165 | ||
| 162 | } | ||
| 163 | 166 | ||
| 167 | if(($wakka->GetBBBUserData("readotherdata")=="No"&&!$wakka->recordReadAccess($ppldata))||$hrexclusiveflag==1)$pass=0; | ||
| 168 | else | ||
| 169 | { | ||
| 164 | 170 | ||
| 165 | $headerexcel = []; | 171 | if($filterbyfielddates==1) |
| 166 | foreach($finputarr as $cachekey) | 172 | { |
| 173 | if(!isset($ppldata[$fieldbyrange])||trim($ppldata[$fieldbyrange])==""){$skippedrows++;continue;} | ||
| 174 | else | ||
| 167 | { | 175 | { |
| 168 | if($cachekey!='') | 176 | //$fieldbyrange $frcrefrom $frcreto |
| 177 | $tdt=explode(".",$ppldata[$fieldbyrange]); | ||
| 178 | if(sizeof($tdt)==3) | ||
| 179 | { | ||
| 180 | $tdt=mktime(0, 0, 0, intval($tdt[1]), intval($tdt[0]), intval($tdt[2])); | ||
| 181 | |||
| 182 | if(!($tdt>=$frcrefrom&&$tdt<=$frcreto)){$skippedrows++;continue;} | ||
| 183 | } | ||
| 184 | else {$skippedrows++;continue;} | ||
| 185 | } | ||
| 186 | } | ||
| 187 | if(sizeof($ddprts)>3) | ||
| 188 | { | ||
| 189 | $dddt1=explode(".",$ppldata[$ddprts[0]]); | ||
| 190 | $dddt2=explode(".",$ppldata[$ddprts[1]]); | ||
| 191 | $dddt1=mktime(0, 0, 0, intval($dddt1[1]), intval($dddt1[0]), intval($dddt1[2])); | ||
| 192 | $dddt2=mktime(0, 0, 0, intval($dddt2[1]), intval($dddt2[0]), intval($dddt2[2])); | ||
| 193 | |||
| 194 | if($ddprts[2]=="LT") | ||
| 195 | { | ||
| 196 | if($dddt1-$dddt2 < $ddprts[3]);else {$skippedrows++;continue;} | ||
| 197 | } | ||
| 198 | if($ddprts[2]=="GT") | ||
| 169 | { | 199 | { |
| 170 | $headerexcel['id'] = 'string'; | 200 | if($dddt1-$dddt2 > $ddprts[3]);else {$skippedrows++;continue;} |
| 171 | $headerexcel[$cachekey] = 'string'; //$headerexcel2[] = $cachekey => 'string'; | ||
| 172 | } | 201 | } |
| 173 | } | 202 | } |
| 174 | // dd($headerexcel2); | ||
| 175 | $filename = "MainReport.xlsx"; | ||
| 176 | header('Content-disposition: attachment; filename="'.XLSXWriter::sanitize_filename($filename).'"'); | ||
| 177 | header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); | ||
| 178 | header('Content-Transfer-Encoding: binary'); | ||
| 179 | header('Cache-Control: must-revalidate'); | ||
| 180 | header('Pragma: public'); | ||
| 181 | 203 | ||
| 182 | $writer = new XLSXWriter(); | ||
| 183 | $styles1 = array( 'font'=>'Arial','font-size'=>10,'font-style'=>'bold', 'fill'=>'#eee', 'halign'=>'center', 'border'=>'left,right,top,bottom'); | ||
| 184 | $writer->writeSheetHeader('Sheet1', $headerexcel,$styles1,['freeze_rows'=>1, 'freeze_columns'=>1]); | ||
| 185 | $writer->writeSheetRow('Sheet1', $selectedfields,$styles1 ); | ||
| 186 | 204 | ||
| 187 | foreach($usersdata as $row) | 205 | $row = $baseRow + $r - $skippedrows;$rkey=0; |
| 206 | |||
| 207 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0,$row)->setValueExplicit($userdata['id'], $type); | ||
| 208 | foreach($baserowArr as $key => $val) | ||
| 188 | { | 209 | { |
| 189 | $writer->writeSheetRow('Sheet1', $row, $row_options = ['height'=>15]); | 210 | $cellval=$wakka->getXlsVal($baserowArr[$key].$reporttype,$ppldata,$logarr); |
| 211 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($key+1,$row)->setValueExplicit($cellval, $type); | ||
| 212 | $rkey=$key+1; | ||
| 190 | } | 213 | } |
| 191 | $writer->writeToStdOut(); | 214 | //month data in report |
| 215 | if($asalyear>2000&&$asalmonth>0) | ||
| 216 | { | ||
| 217 | $saldata=$ppldata["salaryentries"][$asalyear][$asalmonth]; | ||
| 218 | $leavedata=$ppldata["leavesentries"][$asalyear][1][$asalmonth]; | ||
| 192 | 219 | ||
| 193 | return; | ||
| 194 | 220 | ||
| 221 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(++$rkey,$row)->setValueExplicit($leavedata[0][2], $type); | ||
| 222 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey,1)->setValueExplicit("Annual Leaves", $type); | ||
| 223 | |||
| 224 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(++$rkey,$row)->setValueExplicit($leavedata[1][2], $type); | ||
| 225 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey,1)->setValueExplicit("Sick Leaves", $type); | ||
| 226 | |||
| 227 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(++$rkey,$row)->setValueExplicit($leavedata[2][2], $type); | ||
| 228 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey,1)->setValueExplicit("Meternity Leaves", $type); | ||
| 229 | |||
| 230 | for($i=0;$i<=9;$i++) | ||
| 231 | { | ||
| 232 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+1,"1")->setValueExplicit($kformlib->HRFieldNames[$sindex[$i]], $type); | ||
| 233 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+1,$row)->setValueExplicit($saldata[1][$i][1], $type); | ||
| 234 | |||
| 235 | $rkey=$rkey+1; | ||
| 236 | } | ||
| 237 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(++$rkey,$row)->setValueExplicit($wakka->getLOPAmt($ppldata,$asalyear,$asalmonth), $type); | ||
| 238 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey,1)->setValueExplicit("LOP Amount", $type); | ||
| 239 | |||
| 240 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(++$rkey,$row)->setValueExplicit($wakka->getNWDAmt($ppldata,$asalyear,$asalmonth), $type); | ||
| 241 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey,1)->setValueExplicit("NWD Amount", $type); | ||
| 195 | 242 | ||
| 243 | foreach($saldata[0] as $tadded) | ||
| 244 | { | ||
| 245 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+1,1)->setValueExplicit("Add/Ded Type", $type); | ||
| 246 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+2,1)->setValueExplicit("Value", $type); | ||
| 247 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+3,1)->setValueExplicit("Remarks", $type); | ||
| 248 | |||
| 249 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+1,$row)->setValueExplicit($tadded[0], $type); | ||
| 250 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+2,$row)->setValueExplicit($tadded[1], $type); | ||
| 251 | $objPHPExcel->getActiveSheet()->getCellByColumnAndRow($rkey+3,$row)->setValueExplicit($tadded[2], $type); | ||
| 252 | |||
| 253 | $rkey+=3; | ||
| 254 | } | ||
| 255 | } | ||
| 256 | } | ||
| 257 | } | ||
| 258 | |||
| 259 | header('Content-Type: application/vnd.ms-excel'); | ||
| 260 | header('Content-Disposition: attachment;filename="MainReport.xls"'); | ||
| 261 | header('Cache-Control: max-age=0'); | ||
| 262 | |||
| 263 | $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $inputFileType); | ||
| 264 | $objWriter->save('php://output'); | ||
| 265 | return; | ||
| 196 | } | 266 | } |
| 197 | function getQueryFromList($key,$list) | 267 | function getQueryFromList($key,$list) |
| 198 | { | 268 | { |
| ... | @@ -299,17 +369,27 @@ function getQueryFromList($key,$list) | ... | @@ -299,17 +369,27 @@ function getQueryFromList($key,$list) |
| 299 | 369 | ||
| 300 | <div class="layout-app"><!-- row-app --> | 370 | <div class="layout-app"><!-- row-app --> |
| 301 | <div class="row row-app"> | 371 | <div class="row row-app"> |
| 372 | |||
| 302 | <div class="col-md-12"> | 373 | <div class="col-md-12"> |
| 374 | |||
| 303 | <div class="col-separator col-separator-first col-unscrollable box" style='overflow:hidden'> | 375 | <div class="col-separator col-separator-first col-unscrollable box" style='overflow:hidden'> |
| 304 | <div class=innerAll> | 376 | <div class=innerAll> |
| 305 | <div class="relativeWrap" > | 377 | |
| 378 | |||
| 379 | |||
| 380 | <div class="relativeWrap" > | ||
| 306 | <div class="tab_generic"> | 381 | <div class="tab_generic"> |
| 382 | |||
| 383 | <!-- Tabs Heading --> | ||
| 307 | <div class="tab_bar_purple tabsbar-2"> | 384 | <div class="tab_bar_purple tabsbar-2"> |
| 308 | <ul class="row row-merge"> | 385 | <ul class="row row-merge"> |
| 309 | <li class=active><a href="#tabs-1" data-toggle="tab">Select Filters and Report format</a></li> | 386 | <li class=active><a href="#tabs-1" data-toggle="tab">Select Filters and Report format</a></li> |
| 310 | </ul> | 387 | </ul> |
| 311 | </div> | 388 | </div> |
| 389 | <!-- // Tabs Heading END --> | ||
| 390 | |||
| 312 | <div class="tab-content"> | 391 | <div class="tab-content"> |
| 392 | |||
| 313 | <div id=tabs-1 class="tab-pane active"> | 393 | <div id=tabs-1 class="tab-pane active"> |
| 314 | <fieldset> | 394 | <fieldset> |
| 315 | <legend class='task_legend'>Select Filters</legend> | 395 | <legend class='task_legend'>Select Filters</legend> |
| ... | @@ -319,12 +399,16 @@ function getQueryFromList($key,$list) | ... | @@ -319,12 +399,16 @@ function getQueryFromList($key,$list) |
| 319 | <input type=hidden name=visacompany id=visacompany value=''> | 399 | <input type=hidden name=visacompany id=visacompany value=''> |
| 320 | <input type=hidden name=currentstatus id=currentstatus value=''> | 400 | <input type=hidden name=currentstatus id=currentstatus value=''> |
| 321 | <div id=reportformarrs></div> | 401 | <div id=reportformarrs></div> |
| 402 | |||
| 322 | <p> | 403 | <p> |
| 323 | <label class='label-small_new' style='width:15%'>Record Ids:</label> | 404 | <label class='label-small_new' style='width:15%'>Record Ids:</label> |
| 324 | <input class='form_new form_new_amend' id='empid' name='empid' type='text' value='' style='width:25%' /> | 405 | <input class='form_new form_new_amend' id='empid' name='empid' type='text' value='' style='width:25%' /> |
| 325 | <span class=field_desc id='fd'></span><span class=validate_success></span><span class=validate_error></span> | 406 | <span class=field_desc id='fd'></span><span class=validate_success></span><span class=validate_error></span> |
| 326 | </p> | 407 | </p> |
| 327 | <p><label class='label-small_new' style='width:15%'></label><b>-- OR --</b></p> | 408 | <p> |
| 409 | <label class='label-small_new' style='width:15%'></label> | ||
| 410 | <b>-- OR --</b> | ||
| 411 | </p> | ||
| 328 | <p> | 412 | <p> |
| 329 | <label class='label-small_new' style='width:15%'>Company: </label> | 413 | <label class='label-small_new' style='width:15%'>Company: </label> |
| 330 | <select name=client2 id=client2 multiple='' data-rel=chosen class=select2multi style='width:40%'> | 414 | <select name=client2 id=client2 multiple='' data-rel=chosen class=select2multi style='width:40%'> |
| ... | @@ -336,7 +420,7 @@ function getQueryFromList($key,$list) | ... | @@ -336,7 +420,7 @@ function getQueryFromList($key,$list) |
| 336 | </select> | 420 | </select> |
| 337 | </p> | 421 | </p> |
| 338 | <div class='clear:both'></div> | 422 | <div class='clear:both'></div> |
| 339 | <!--<p> | 423 | <!-- <p> |
| 340 | <label class='label-small_new' style='width:15%'>Visa Company: </label> | 424 | <label class='label-small_new' style='width:15%'>Visa Company: </label> |
| 341 | <select name=visacompany2 id=visacompany2 multiple='' data-rel=chosen class=select2multi style='width:40%'> | 425 | <select name=visacompany2 id=visacompany2 multiple='' data-rel=chosen class=select2multi style='width:40%'> |
| 342 | <?php | 426 | <?php |
| ... | @@ -345,34 +429,81 @@ function getQueryFromList($key,$list) | ... | @@ -345,34 +429,81 @@ function getQueryFromList($key,$list) |
| 345 | ?> | 429 | ?> |
| 346 | </select> | 430 | </select> |
| 347 | </p>--> | 431 | </p>--> |
| 348 | 432 | <p> | |
| 433 | <label class='label-small_new' style='width:15%'>Record Status: </label> | ||
| 434 | <select name=currentstatus2 id=currentstatus2 multiple='' data-rel=chosen class=select2multi style='width:40%'> | ||
| 349 | <?php | 435 | <?php |
| 350 | $toarr=array(); | 436 | $clients=explode("~",$kformlib->FormSelectVals['currentstatus']); |
| 351 | $optionsstr=""; | 437 | foreach($clients as $clientval){echo "<option value='$clientval'>$clientval</option>";} |
| 352 | $fileids=explode(",",$kformlib->HRFiledsStr); | 438 | ?> |
| 353 | foreach($fileids as $fileid) | 439 | <?php if($wakka->IsAdmin()){ ?><option value='<?php echo $wakka->HRCoreVars["systemExitStatus"]; ?>'><?php echo $wakka->HRCoreVars["systemExitStatus"]; ?></option><?php } ?> |
| 354 | { | 440 | </select> |
| 441 | </p> | ||
| 442 | <p> | ||
| 443 | <label class='label-small_new' style='width:15%'>Record Modified From: </label> | ||
| 444 | <input size=7 id='modfrom' name='modfrom' type='text' value='' /> To: <input size=7 id='modto' name='modto' type='text' value='' /> | ||
| 445 | </p> | ||
| 446 | <p> | ||
| 447 | <label class='label-small_new' style='width:15%'>Record Created From: </label> | ||
| 448 | <input size=7 id='crefrom' name='crefrom' type='text' value='' /> To: <input size=7 id='creto' name='creto' type='text' value='' /> | ||
| 449 | </p> | ||
| 450 | <p> | ||
| 451 | <label class='label-small_new' style='width:15%'>For:</label><select class='form_hrm_select' id=fieldbyrange name=fieldbyrange><option></option> | ||
| 452 | <?php | ||
| 453 | $dtfields=explode(",",$kformlib->HRDateFilds); | ||
| 454 | foreach($dtfields as $tdtf)if(trim($tdtf)!="")echo "<option value='$tdtf'>".$kformlib->HRFieldNames[$tdtf]."</option>"; | ||
| 455 | ?> | ||
| 456 | </select> | ||
| 457 | </p> | ||
| 458 | |||
| 459 | <p> | ||
| 460 | <label class='label-small_new' style='width:15%'>Between:</label> | ||
| 461 | <input size=7 id='frcrefrom' name='frcrefrom' type='text' value='' /> To: <input size=7 id='frcreto' name='frcreto' type='text' value='' /> | ||
| 462 | </p> | ||
| 463 | |||
| 464 | <?php | ||
| 465 | $toarr=array(); | ||
| 466 | $optionsstr=""; | ||
| 467 | $fileids=explode(",",$kformlib->HRFiledsStr); | ||
| 468 | foreach($fileids as $fileid) | ||
| 469 | { | ||
| 355 | if(trim($fileid)!='') | 470 | if(trim($fileid)!='') |
| 356 | { | 471 | { |
| 357 | if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File'; | 472 | if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File'; |
| 358 | else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date'; | 473 | else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date'; |
| 359 | else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown'; | 474 | else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown'; |
| 360 | else $ftype='Text'; | 475 | else $ftype='Text'; |
| 361 | $toarr[$fileid]=$kformlib->HRFieldNames[$fileid]; | 476 | $toarr[$fileid]=$kformlib->HRFieldNames[$fileid]." ($ftype)"; |
| 362 | } | ||
| 363 | } | 477 | } |
| 478 | } | ||
| 364 | //asort($toarr); | 479 | //asort($toarr); |
| 365 | foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>"; | 480 | foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>"; |
| 366 | ?> | 481 | ?> |
| 367 | 482 | ||
| 368 | <p><label class='label-small_new' style='width:15%;'>Fields: </label> | 483 | <p><label class='label-small_new' style='width:15%;'>Fields: </label> |
| 369 | <select size=9 id=fieldsarr2 multiple='multiple' style='width:40%' class=select2multi> | 484 | <select size=9 id=fieldsarr2 multiple='multiple' style='width:40%' class=select2multi><?php echo $optionsstr; ?></select><span style='margin-left: 20px;line-height: 30px;'>(Hold ctrl to select multiple)</span></p> |
| 370 | <?php echo $optionsstr; ?> | 485 | <p><label class='label-small_new' style='width:15%'>Report Type</label><select class='form_hrm_select' id=reporttype name=reporttype><option value='Values'>Values</option><option value='Binary'>Binary</option><option value='History'>History</option></select> |
| 486 | <select class='form_hrm_select' id=outputtype name=outputtype><option value='XLS'>XLS</option><option value='CSV'>CSV</option></select> | ||
| 487 | <select class='form_hrm_select' id='asalmonth' name='asalmonth'> | ||
| 488 | <option value=''></option> | ||
| 489 | <option value=1>Jan</option> | ||
| 490 | <option value=2>Feb</option> | ||
| 491 | <option value=3>Mar</option> | ||
| 492 | <option value=4>Apr</option> | ||
| 493 | <option value=5>May</option> | ||
| 494 | <option value=6>Jun</option> | ||
| 495 | <option value=7>Jul</option> | ||
| 496 | <option value=8>Aug</option> | ||
| 497 | <option value=9>Sep</option> | ||
| 498 | <option value=10>Oct</option> | ||
| 499 | <option value=11>Nov</option> | ||
| 500 | <option value=12>Dec</option> | ||
| 371 | </select> | 501 | </select> |
| 372 | <span style='margin-left: 20px;line-height: 30px;'>(Hold ctrl to select multiple)</span> | 502 | <select class='form_hrm_select' id='asalyear' name='asalyear'> |
| 373 | </p> | 503 | <option value=''></option> |
| 374 | <p><label class='label-small_new' style='width:15%'>Report Type</label> | 504 | <?php for($i=date('Y')+1;$i>=1990;$i--)echo "<option value=$i>$i</option>"; ?> |
| 375 | <select class='form_hrm_select' id=outputtype name=outputtype><option value='XLSX'>XLSX</option><!-- <option value='CSV'>CSV</option></select> --> | 505 | </select> |
| 506 | |||
| 376 | </p> | 507 | </p> |
| 377 | 508 | ||
| 378 | <p> | 509 | <p> |
| ... | @@ -397,12 +528,12 @@ function getQueryFromList($key,$list) | ... | @@ -397,12 +528,12 @@ function getQueryFromList($key,$list) |
| 397 | 528 | ||
| 398 | </fieldset> | 529 | </fieldset> |
| 399 | </div> | 530 | </div> |
| 400 | </div> | 531 | </div> |
| 401 | 532 | ||
| 402 | </div> | 533 | </div> |
| 403 | </div> | 534 | </div> |
| 404 | </div> | 535 | </div> |
| 405 | <!-- // Tabs END --> | 536 | <!-- // Tabs END --> |
| 406 | 537 | ||
| 407 | 538 | ||
| 408 | 539 | ||
| ... | @@ -410,31 +541,28 @@ function getQueryFromList($key,$list) | ... | @@ -410,31 +541,28 @@ function getQueryFromList($key,$list) |
| 410 | </div> | 541 | </div> |
| 411 | </div> | 542 | </div> |
| 412 | 543 | ||
| 413 | </div> | 544 | </div> |
| 414 | </div><!-- // END row-app --> | 545 | </div><!-- // END row-app --> |
| 415 | 546 | ||
| 416 | <script> | 547 | <script> |
| 417 | $('#modfrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 548 | $('#modfrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 418 | $('#modto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 549 | $('#modto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 419 | $('#crefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 550 | $('#crefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 420 | $('#creto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 551 | $('#creto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 421 | 552 | ||
| 422 | $('#frcrefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 553 | $('#frcrefrom').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 423 | $('#frcreto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); | 554 | $('#frcreto').datepicker({dateFormat: 'dd.mm.yy',inline: true,changeYear: true,selectOtherMonths: true,yearRange: '<?php echo (date('Y')-70).":".(date('Y')+5); ?>'}); |
| 424 | 555 | ||
| 425 | function setRptSelection() | 556 | function setRptSelection() |
| 426 | { | 557 | { |
| 427 | $("#client").val($("#client2").val()); | 558 | $("#client").val($("#client2").val()); |
| 428 | // $("#visacompany").val($("#visacompany2").val()); | 559 | // $("#visacompany").val($("#visacompany2").val()); |
| 429 | $("#currentstatus").val($("#currentstatus2").val()); | 560 | $("#currentstatus").val($("#currentstatus2").val()); |
| 430 | |||
| 431 | $("#reportformarrs").html(""); | ||
| 432 | $("#fieldsarr2").select2("data").forEach(function(elem){$("#reportformarrs").append("<input type=hidden name=fieldsarr[] value='"+elem.id+"'>");}); | ||
| 433 | |||
| 434 | $("#fieldsarr2").select2("data").forEach(function(elem){$("#reportformarrs").append("<input type=hidden name=selectedfields[] value='"+elem.text+"'>");}); | ||
| 435 | 561 | ||
| 562 | $("#reportformarrs").html(""); | ||
| 563 | $("#fieldsarr2").select2("data").forEach(function(elem){$("#reportformarrs").append("<input type=hidden name=fieldsarr[] value='"+elem.id+"'>");}); | ||
| 436 | 564 | ||
| 437 | document.reportform.submit(); | 565 | document.reportform.submit(); |
| 438 | } | 566 | } |
| 439 | // $("#client2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." }); | 567 | // $("#client2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." }); |
| 440 | // $("#visacompany2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." }); | 568 | // $("#visacompany2").dropdownchecklist({icon:{}, width:300, maxDropHeight:300, emptyText:"Select.." }); | ... | ... |
| ... | @@ -198,12 +198,14 @@ $reportarr=$wakka->LoadAll("select * from hrms_masters where mtype='reports' ord | ... | @@ -198,12 +198,14 @@ $reportarr=$wakka->LoadAll("select * from hrms_masters where mtype='reports' ord |
| 198 | if($user["role"]=="Manager"||$wakka->IsAdmin()) | 198 | if($user["role"]=="Manager"||$wakka->IsAdmin()) |
| 199 | { | 199 | { |
| 200 | $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'"); | 200 | $companyarr=$wakka->LoadAll("select * from hrms_masters where mtype='company'"); |
| 201 | // print_r($companyarr); | ||
| 201 | foreach($companyarr as $tcompany)echo "<option value='$tcompany[mkey]'>$tcompany[mkey]</option>"; | 202 | foreach($companyarr as $tcompany)echo "<option value='$tcompany[mkey]'>$tcompany[mkey]</option>"; |
| 202 | } | 203 | } |
| 203 | else | 204 | else |
| 204 | { | 205 | { |
| 205 | echo "<option value=''></option>"; | 206 | echo "<option value=''></option>"; |
| 206 | $clients=explode(",",trim($wakka->GetBBBUserData("clientsownerlist"))); | 207 | $clients=explode(",",trim($wakka->GetBBBUserData("clientsownerlist"))); |
| 208 | // print_r($clients); | ||
| 207 | foreach($clients as $tclient)if(trim($tclient)!="")echo "<option value='$tclient'>$tclient</option>"; | 209 | foreach($clients as $tclient)if(trim($tclient)!="")echo "<option value='$tclient'>$tclient</option>"; |
| 208 | } | 210 | } |
| 209 | ?> | 211 | ?> |
| ... | @@ -426,6 +428,9 @@ function saveCompanies() | ... | @@ -426,6 +428,9 @@ function saveCompanies() |
| 426 | { | 428 | { |
| 427 | var vardata="client="+$("#companyselect").val(); | 429 | var vardata="client="+$("#companyselect").val(); |
| 428 | 430 | ||
| 431 | vardata+="&status="+encodeURIComponent($("#status").val()); | ||
| 432 | vardata+="&campaignstartdate="+encodeURIComponent($("#campaignstartdate").val()); | ||
| 433 | vardata+="&campaignenddate="+encodeURIComponent($("#campaignenddate").val()); | ||
| 429 | vardata+="&agencyfeesvalue="+encodeURIComponent($("#agencyfeesvalue").val()); | 434 | vardata+="&agencyfeesvalue="+encodeURIComponent($("#agencyfeesvalue").val()); |
| 430 | vardata+="&agencyfeefunction="+encodeURIComponent($("#agencyfeefunction").val()); | 435 | vardata+="&agencyfeefunction="+encodeURIComponent($("#agencyfeefunction").val()); |
| 431 | vardata+="&contractstartdate="+encodeURIComponent($("#contractstartdate").val()); | 436 | vardata+="&contractstartdate="+encodeURIComponent($("#contractstartdate").val()); | ... | ... |
-
Please register or sign in to post a comment