loadcompanymaster.blade.php
9.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!-- Updated Code for Campaign Based CRM -->
<?php
if(Input::has('addcompany'))
{
$company=trim(Input::get("addcompany"));
if($company!="")
{
$companyarr=$wakka->LoadSingle("select * from hrms_masters where mtype='company' and mkey='$company'");
if(!$companyarr)
{
$wakka->Query("insert into hrms_masters set mvalue='',mkey='$company',mtype='company';");
}
}
return;
}
$kformlib=new \App\Jobs\KFormLib($wakka->HRCoreVars["HRFiledsStr"]);
$client=Input::get("client");
$snedmailsarr=array();
$workflowarr=$wakka->LoadAll("select * from hrms_masters where mtype='workflow';");
foreach($workflowarr as $wfline)
{
$workflow=explode("~~~",$wfline['mvalue']);
$controls=explode("|",$workflow[0]);
$tasks=explode("_EOF_",$workflow[1]);//$tasks=explode("\n",$workflow[1]);
foreach($tasks as $task)
{
if(trim($task)!='')
{
$taskVals=explode("|",$task);$taskVals[0]=trim($taskVals[0]);
if($taskVals[0]=="{{clientcontact}}")
{
$snedmailsarr[]=$controls[0];
}
}
}
}
if($client!="")
{
$mastersdata=$wakka->getCompanyMaster($client);
echo "<div style='display:none'><br>";
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>";
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>";
echo "<p><label class='label-small_new' style='width:15%'>Serviced By :</label><input type=text class='form_new form_new_amend' name=servicedby id=servicedby value='".($mastersdata["servicedby"])."'></p>";
echo "<p><label class='label-small_new' style='width:15%'>Insurance Required:</label><select class='form_hrm_select' name=insurancerequired id=insurancerequired>
<option value='".($mastersdata["insurancerequired"])."'>".($mastersdata["insurancerequired"])."</option>
<option value=Yes>Yes</option>
<option value=No>No</option>
</select></p>";
echo "<fieldset style='float:left;width:45%;margin-right:3px;' id='hr_cntct'><legend class='new-recruit_legend'>HR Contact</legend><p><label class='label-small_new' style='width:25%'>Person :</label><input type=text class='form_new form_new_amend' name=contactname id=contactname value='".($mastersdata["contactname"])."'></p>";
echo "<p><label class='label-small_new' style='width:25%'>Phone :</label><input type=text class='form_new form_new_amend' name=contactphone id=contactphone value='".($mastersdata["contactphone"])."'></p>";
echo "<p><label class='label-small_new' style='width:25%'>Email :</label><input type=text class='form_new form_new_amend' name=contactemail id=contactemail value='".($mastersdata["contactemail"])."'></p>
<p><label class='label-small_new' style='width:25%'>Send Files</label><select id=hrsendfiles name=hrsendfiles multiple='multiple' size=5>";
$toarr=array();
$optionsstr="";
foreach($snedmailsarr as $fileid)
{
if(trim($fileid)!='')$toarr[$fileid]=$kformlib->HRFieldNames[$fileid];
}
$toarr['weeklyexpiringdocs']="Weekly Expiring Docs";
asort($toarr);
foreach($toarr as $key=>$opts)
{
$selstr="";if(strstr($mastersdata["hrsendfiles"],$key))$selstr="selected=selected";
$optionsstr.="<option value='$key' $selstr>$opts</option>";
}
echo "$optionsstr</select></p></fieldset>";
echo "<fieldset style='float:left;width:45%' id='acc_cntct'><legend class='new-recruit_legend'>Accounts Contact</legend><p><label class='label-small_new' style='width:25%'>Person :</label><input type=text class='form_new form_new_amend' name=contactnameacct id=contactnameacct value='".($mastersdata["contactnameacct"])."'></p>";
echo "<p><label class='label-small_new' style='width:25%'>Phone :</label><input type=text class='form_new form_new_amend' name=contactphoneacct id=contactphoneacct value='".($mastersdata["contactphoneacct"])."'></p>";
echo "<p><label class='label-small_new' style='width:25%'>Email :</label><input type=text class='form_new form_new_amend' name=contactemailacct id=contactemailacct value='".($mastersdata["contactemailacct"])."'></p>
<p><label class='label-small_new' style='width:25%'></label> </p></fieldset><div style='clear:both'></div>";
echo "<p><label class='label-small_new' style='width:15%'>Working Days in Month :</label><input type=text class='form_new form_new_amend' name=monthworkdays id=monthworkdays value='".($mastersdata["monthworkdays"])."'> eg M or 30 or 31</p>";
echo "<p><label class='label-small_new' style='width:15%'>AgencyFee/Emp/Month :</label><input type=text class='form_new form_new_amend' name=agencyfeesvalue id=agencyfeesvalue value='".($mastersdata["agencyfeesvalue"])."' style='width:15%'>
<select class=form_hrm_select style='width:15%' name=agencyfeefunction id=agencyfeefunction><option value='$mastersdata[agencyfeefunction]'>$mastersdata[agencyfeefunction]</option>
<option value=''></option><option value='X Gross'>X Gross</option><option value='X CTCIndia'>X CTCIndia</option></select></p>";
echo "<p><label class='label-small_new' style='width:15%'>AnnualLeaves :</label><input type=text class='form_new form_new_amend' name=yrannualleaves id=yrannualleaves value='".($mastersdata["yrannualleaves"])."'></p>";
echo "<p><label class='label-small_new' style='width:15%'>SickLeaves :</label><input type=text class='form_new form_new_amend' name=yrsickleaves id=yrsickleaves value='".($mastersdata["yrsickleaves"])."'></p>";
echo "<p><label class='label-small_new' style='width:15%'>MeternityLeaves :</label><input type=text class='form_new form_new_amend' name=yrmeternityleaves id=yrmeternityleaves value='".($mastersdata["yrmeternityleaves"])."'></p>";
echo "<p><label class='label-small_new' style='width:15%'>AnnualMaxCarryLeaves :</label><input type=text class='form_new form_new_amend' name=yemaxcarryleaves id=yemaxcarryleaves value='".($mastersdata["yemaxcarryleaves"])."'></p>";
echo "<p><label class='label-small_new' style='width:15%'>AnnualMaxCarryLeaves :</label><input type=text class='form_new form_new_amend' name=yemaxcarryleaves id=yemaxcarryleaves value='".($mastersdata["yemaxcarryleaves"])."'></p></div>";
echo "<p><label class='label-small_new' style='width:15%'>Script</label><textarea rows=8 id='campaignscript' style='font-size:12px;width:85%'>".($mastersdata["campaignscript"])."</textarea></p>";
echo "<p><label class='label-small_new' style='width:15%'>Parameters</label><textarea rows=8 id='developerparam' style='font-size:12px;width:85%'>".($mastersdata["developerparam"])."</textarea></p>";
echo "<p><label class='label-small_new' style='width:15%'>CRM Fields</label><textarea id='campaigncrmfields' style='font-size:12px;width:85%;height:300px'>".($mastersdata["campaigncrmfields"])."</textarea></p>";
// code start - calling mode assign campaign wise functionality - by YASHWANT on 11042017
echo "<p><label class='label-small_new' style='width:15%'>Calling Mode</label><select class='form_hrm_select' id='campaignCallingMode'><option value>User able select</option><option value='Progressive' ".($mastersdata["campaignCallingMode"]=="Progressive"?"selected":"").">Progressive</option><option value='Manual' ".($mastersdata["campaignCallingMode"]=="Manual"?"selected":"").">Manual</option><option value='Incoming' ".($mastersdata["campaignCallingMode"]=="Incoming"?"selected":"").">Incoming</option><option value='Predictive' ".($mastersdata["campaignCallingMode"]=="Predictive"?"selected":"").">Predictive</option></select></p>";
// code end - calling mode assign campaign wise functionality - by YASHWANT on 11042017
$checked = "";
if($mastersdata["blendedCalling"]=="1")$checked="checked";
echo "<p><label style='width:15%'><input type='hidden' value='0' name='blendVal' id='blendVal'></label>
<input type='checkbox' class='custom-control-input' id='blendedcheck' ".$checked.">
<label class='custom-control-label' for='defaultChecked2'>Blended Calling</label></p>";
if(!isset($mastersdata["trackerfields"]))$mastersdata["trackerfields"]="";
$trackerfieldsarr=array_unique(array_filter(explode(",",$mastersdata["trackerfields"])));
$toarr=array();
$optionsstr="";
$fileids=explode(",",$kformlib->HRFiledsStr);
foreach($fileids as $fileid)
{
if(trim($fileid)!='')
{
if(strstr($kformlib->HRFileFieldsStr,$fileid))$ftype='File';
else if(strstr($kformlib->HRDateFilds,$fileid))$ftype='Date';
else if(strstr($kformlib->HRDropFilds,$fileid))$ftype='Dropdown';
else $ftype='Text';
$toarr[$fileid]=$kformlib->HRFieldNames[$fileid]." ($ftype)";
}
}
asort($toarr);
foreach($trackerfieldsarr as $key)$optionsstr.="<option value='$key' selected>$toarr[$key]</option>";
foreach($toarr as $key=>$opts)$optionsstr.="<option value='$key'>$opts</option>";
?>
<script>
$(document).ready(function(){
$('#blendedcheck').change(function() {
if(this.checked) {
$callingmode = $('#campaignCallingMode').val();
if($callingmode != "Predictive")
{
simpleNotification('error','topRight','Please select Predictive mode first!');
$(this).prop('checked', false);
return;
}
else
{
$('#blendVal').val("1");
}
}
else
{
$('#blendVal').val("0");
}
});
$('#campaignCallingMode').change(function() {
$currVal = $(this).val();
if($currVal != "Predictive")
{
$('#blendedcheck').prop('checked', false);
$('#blendVal').val("0");
}
});
});
</script>
<?php
}
?>