a3290257 by Manish Mihsra

Migration and Tables added with New changes

1 parent 03982206
......@@ -1139,30 +1139,6 @@ function createQaireTab()
//Supervisor Recommendation - By Manish on 20-02-17
//Supervisor Recommendation - By Prashant Jadhav on 07-11-17
if($dataarr['clientcode'])
{
$supComnt = DB::table('DU_CRM_SUPERVISOR_COMMENTS')->where('V_CUSTID','=',$dataarr['clientcode'])->orderBy('V_LAST_REVIEWED_ON','DESC')->limit(3)->get();
}
foreach($supComnt as $supervisorcomments)
{
$data.="<p style='clear:both'><br>
<label style='width:15%;' title=''>Supervisor Recommendation:</label>
<textarea id='dialer_userremarks' name='dialer_userremarks' style='width:30%;height:100px;' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments->T_BM_INSTRUCTION."</textarea>&nbsp;&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>BM Product Recommendation:</label><textarea id='dialer_userremarks' name='dialer_userremarks' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters' readonly>".$supervisorcomments->T_BM_PRODUCT_RECO."</textarea><br><br>
<label style='width:15%;' title=''>Last Review On:</label>
<label style='width:30%;' title=''>".$supervisorcomments->V_LAST_REVIEWED_ON."</label>";
$data.="&nbsp;&nbsp;&nbsp;<label style='width:15%;' title=''>Agent Comment: </label>";
if($supervisorcomments->agent_comments)
$data.="<textarea id='".$supervisorcomments->id."_agent_comment' name='agent_comment' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters'>".$supervisorcomments->agent_comments."</textarea>";
else
$data.="<textarea id='".$supervisorcomments->id."_agent_comment' name='agent_comment' style='width:20%;height:100px;' maxlength=250 placeholder='Only 250 Characters'></textarea>";
$data.="</p><div class='container'>
<input type=button id='".$supervisorcomments->id."_submitComments' class='btn btn-info' value='Submit' onclick='updateagentcomments(".$supervisorcomments->id.");'style=' margin: 5px 0 5px 660px;'>
</div>";
}
$data.="<legend class='task_legend'>Primary Questions</legend>
......@@ -2798,655 +2774,7 @@ function createChildCase()
return $data;
}
//Function for lead form creation by Gopal
function createLeadEntryForm()
{ $leadFormProducts = DB::table("leadform_products")->get();
$dataarr=$this->recruitdata["peopledata"];
$products = "<option value=''></option>";
foreach ($leadFormProducts as $key => $fields)
{
if($fields->products)
$products.= "<option value='$fields->products'>$fields->products</option>";
}
$branchcodeMaster=DB::table("UD_CRM_BR_MASTER")->select('BR_CODE','BR_NAME')->get();
$brcode = "<option value=''></option>";
$brname = "<option value=''></option>";
foreach ($branchcodeMaster as $key => $brmaster)
{
if($brmaster->BR_CODE)
$brcode.= "<option value='$brmaster->BR_CODE'>$brmaster->BR_CODE</option>";
if($brmaster->BR_NAME)
$brname.= "<option value='$brmaster->BR_CODE'>$brmaster->BR_NAME</option>";
}
$sm_master= DB::table("UD_SM_MAPPING")->select(DB::raw('distinct USER_NAME'))->where('USER_NAME','!=','')->get();
$smname="<option value=''></option>";
foreach ($sm_master as $key => $sm_name)
{
if($sm_name->USER_NAME)
$smname.= "<option value='$sm_name->USER_NAME'>$sm_name->USER_NAME</option>";
}
$cust_profile= DB::table("UD_LEAD_ENTRY_CUSTOMER_PROFILE")->select('CUST_PROFILE')->get();
$custprofile="<option value=''></option>";
foreach ($cust_profile as $key => $cust_pro) {
$custprofile.="<option value='$cust_pro->CUST_PROFILE'>$cust_pro->CUST_PROFILE</option>";
}
$dataarr=$this->recruitdata["peopledata"];
$data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
<h5>Lead Entry Form</h5>
<hr/><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['firstname']."' id='customer_name' readonly>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Branch Name</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='br_name'>$brname</select>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>LG Code</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='' id='lg_code'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Mobile Number</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['mobile']."' id='mobile'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Processing entity</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='processing_entity'><option value='SALES'>SALES</option><option value='OCC'>OCC</option></select>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Lead Owner</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='lead_owner'>$smname</select>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Lead Priority</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='lead_priority'><option value='Urgent'>Urgent</option><option value='Normal'>Normal</option></select>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Product</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='product'>$products</select>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Profile</label>
<select class='form_hrm_select select2multi' style='width:50%;border: 2px solid;' id='customer_profile'>$custprofile</select>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div>
<label class='label-small_new' style='width:14%;font-weight:bold;'>Remarks</label>
<textarea class='form_new form_new_amend'style='width:74%;border: 2px solid;' maxlength='512' id='remarks' rows='4'></textarea>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<input type='button' class='btn btn-default btn-md' style='margin-left:40%;font-weight:bold;' value='Save' id='leadformSave'>
</div>
</div>
<script>
$('#leadformSave').click(function()
{
if(kstychCall['ts_Talk']<1||Math.ceil(((getNowTS()-kstychCall['ts_Talk'])/1000))<10)
{
simpleNotification('error','topRight','please get On call first');
$('#br_name').select2('data', {id:'', text:''});
$('#lg_code').val('');
$('#processing_entity').select2('data', {id:'', text:''});
$('#lead_owner').select2('data', {id:'', text:''});
$('#lead_priority').select2('data', {id:'', text:''});
$('#product').select2('data', {id:'', text:''});
$('#customer_profile').select2('data', {id:'', text:''});
$('#remarks').val('');
return;
}
else
{
var br_code = $('#br_name').val();
var br_name= $('#br_name option:selected').text();
var lg_code = $('#lg_code').val();
var mobile = $('#mobile').val();
var processing_entity = $('#processing_entity').val();
var lead_owner = $('#lead_owner').val();
var lead_priority = $('#lead_priority').val();
var product = $('#product').val();
var customer_profile = $('#customer_profile').val();
var remarks = $('#remarks').val();
if(br_name==''){
simpleNotification('error','topRight','please select Branch Name');
return;
}else if(lg_code==''){
simpleNotification('error','topRight','please enter LG Code');
return;
}else if(mobile==''){
simpleNotification('error','topRight','please enter Mobile Number');
return;
}else if(processing_entity==''){
simpleNotification('error','topRight','please select Processing Entity');
return;
}else if(lead_owner==''){
simpleNotification('error','topRight','please Select lead owner');
return;
}else if(lead_priority==''){
simpleNotification('error','topRight','please select lead Priority');
return;
}else if(product==''){
simpleNotification('error','topRight','please select Product');
return;
}else if(customer_profile==''){
simpleNotification('error','topRight','please select Customer Profile');
return;
}else if(remarks==''){
simpleNotification('error','topRight','please select Remarks');
return;
}
$('#br_name').select2('data', {id:'', text:''});
$('#lg_code').val('');
$('#processing_entity').select2('data', {id:'', text:''});
$('#lead_owner').select2('data', {id:'', text:''});
$('#lead_priority').select2('data', {id:'', text:''});
$('#product').select2('data', {id:'', text:''});
$('#customer_profile').select2('data', {id:'', text:''});
$('#remarks').val('');
var postdata='varid='+$('#varid').val();
postdata+='&mobile='+'".$dataarr["mobile"]."';
postdata+='&client='+'".$dataarr["client"]."';
postdata+='&clientcode='+'".$dataarr["clientcode"]."';
postdata+='&firstname='+'".$dataarr["firstname"]."';
postdata+='&br_code='+encodeURIComponent(br_code);
postdata+='&br_name='+encodeURIComponent(br_name);
postdata+='&lg_code='+encodeURIComponent(lg_code);
postdata+='&processing_entity='+encodeURIComponent(processing_entity);
postdata+='&lead_owner='+encodeURIComponent(lead_owner);
postdata+='&lead_priority='+encodeURIComponent(lead_priority);
postdata+='&product='+encodeURIComponent(product);
postdata+='&customer_profile='+encodeURIComponent(customer_profile);
postdata+='&remarks='+encodeURIComponent(remarks);
doAjax('leadentryform',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
}
});
</script>
";
return $data;
}
function createRacingCust()
{
$dataarr=$this->recruitdata["peopledata"];
$data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
<h5>Customer Information</h5>
<hr/><br>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Date</label>
<label class='label-small_new' style='width:50%;' >".date('Y-m-d')."</label>
</div>
<br><br>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>PB Code</label>
<input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBcode'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>PB Name</label>
<input type='text' class='form_new form_new_amend'style='width:50%;' value='' id='PBname'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>PB landline Contact No.</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='PBlandlineContNo'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Supervisor Mail ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='SupervisormailID'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left' class='search'>
<label class='label-small_new' style='width:29%;'>Group ID</label>
<input type='text' class='form_new form_new_amend' style='width:52%;' id='groupID' value=''>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Group ID Name</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='groupidname' value=''>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Cust ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='custID' maxlength='16'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Cust Name</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='custname' value=''>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Relationship With Group ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='RelationshipGroupID' maxlength='16'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Cust ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='Custid' maxlength='16'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Cust Name</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='CustName' value=''>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Relationship With Group ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='relationshipgroupid' maxlength='16'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Grouping</label>
<select id='newGroupdditiongroup' class='form_hrm_select select2multi' style='width:50%'>
<option value='New_Group'>New Group</option>
<option value='Addition_to_group'>Addition to group</option>
<option value='Addition_to_group'>Regroup</option>
</select>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;'>Racing from</label>
<input type='text' class='form_new form_new_amend' style='width:50%;' id='racingfrom'>
</div>
</div>
<br><br><br>
<br><br>
<div style='clear:both;width:100%;'>
<input type='button' class='btn btn-default btn-md' style='margin-left:40%' value='Save' id='CRSave'>
</div>
</div>
<script>
$('#CRSave').click(function()
{
var snumber = $('#snumber').val();
var PBname = $('#PBname').val();
var PBcode = $('#PBcode').val();
var PBlandlineContNo = $('#PBlandlineContNo').val();
var SupervisormailID = $('#SupervisormailID').val();
var groupID = $('#groupID').val();
var groupidname = $('#groupidname').val();
var custID = $('#custID').val();
var custname = $('#custname').val();
var RelationshipGroupID = $('#RelationshipGroupID').val();
var Custid = $('#Custid').val();
var CustName = $('#CustName').val();
var relationshipgroupid = $('#relationshipgroupid').val();
var newGroupdditiongroup = $('#newGroupdditiongroup').val();
var racingfrom = $('#racingfrom').val();
var postdata='s_no='+encodeURIComponent(snumber);
postdata+='&pb_name='+encodeURIComponent(PBname);
postdata+='&pb_code='+encodeURIComponent(PBcode);
postdata+='&pb_landline_contact_no='+encodeURIComponent(PBlandlineContNo);
postdata+='&supervisor_mail_id='+encodeURIComponent(SupervisormailID);
postdata+='&group_id='+encodeURIComponent(groupID);
postdata+='&group_id_name='+encodeURIComponent(groupidname);
postdata+='&cust_id='+encodeURIComponent(custID);
postdata+='&cust_name='+encodeURIComponent(custname);
postdata+='&relationship_with_group_id='+encodeURIComponent(RelationshipGroupID);
postdata+='&cust_id_next='+encodeURIComponent(Custid);
postdata+='&cust_name_next='+encodeURIComponent(CustName);
postdata+='&relationship_with_group_id_next='+encodeURIComponent(relationshipgroupid);
postdata+='&new_group_addition_to_group='+encodeURIComponent(newGroupdditiongroup);
postdata+='&racing_from='+encodeURIComponent(racingfrom);
postdata+='&mobile='+'".$dataarr["mobile"]."';
postdata+='&client='+'".$dataarr["client"]."';
postdata+='&clientcode='+'".$dataarr["clientcode"]."';
doAjax('custrace',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
});
</script>";
return $data;
}
//for RLP
function createRLP()
{
$dataarr=$this->recruitdata["peopledata"];
$rlpcust = DB::table('p11086_cop_rlp_cust_base_uat')->where('pbcode','=',$dataarr["client"])->where('cod_cust','=',$dataarr["clientcode"])->select('*')->get();
$data="";
//echo "<pre>".print_r($rlpcust)."</pre>";
$data.="<fieldset><legend class='new-recruit_legend'>RLP Customer WISE</legend>";
$data.="<div class=custom1 style='width:100%;'>
<h2></h2>";
$data.="<hr><br><table class='table kDataTable' cellpadding=0 cellspacing=0 border=0>
<thead><tr>
<td class='table_hrm_heading_green'>Product</td>
<td class='table_hrm_heading_green'>Opportunity</td>
<td class='table_hrm_heading_green'>Contacted</td>
<td class='table_hrm_heading_green'>Pitched</td>
<td class='table_hrm_heading_green'>LG</td>
</tr></thead>";
$data.="<tr>
<td>AL (overall)</td>
<td>".$rlpcust[0]->al_opp."</td>
<td>".$rlpcust[0]->al_called_opp."</td>
<td>".$rlpcust[0]->al_pitch."</td>
<td>".$rlpcust[0]->al_lg."</td>
</tr>
<tr>
<td>PL/BL (overall)</td>
<td>".$rlpcust[0]->pl_opp."</td>
<td>".$rlpcust[0]->pl_called_opp."</td>
<td>".$rlpcust[0]->pl_pitch."</td>
<td>".$rlpcust[0]->pl_lg."</td>
</tr>
<tr>
<td>TWL </td>
<td>".$rlpcust[0]->twl_pa_opp."</td>
<td>".$rlpcust[0]->twl_called_opp."</td>
<td>".$rlpcust[0]->twl_pitch."</td>
<td>".$rlpcust[0]->twl_lg."</td>
</tr>
<tr>
<td>HL</td>
<td>".$rlpcust[0]->hl_opp."</td>
<td>".$rlpcust[0]->hl_called_opp."</td>
<td>".$rlpcust[0]->hl_pitch."</td>
<td>".$rlpcust[0]->hl_pitch."</td>
</tr>
<tr>
<td>GL</td>
<td></td>
<td></td>
<td>".$rlpcust[0]->gl_pitch."</td>
<td>".$rlpcust[0]->gl_lg."</td>
</tr>
<tr>
<td>LAS</td>
<td>".$rlpcust[0]->las_opp."</td>
<td>".$rlpcust[0]->las_called_opp."</td>
<td>".$rlpcust[0]->las_pitch."</td>
<td>".$rlpcust[0]->las_lg."</td>
</tr>
<tr>
<td>LAP</td>
<td>".$rlpcust[0]->lap_opp."</td>
<td>".$rlpcust[0]->lap_called_opp."</td>
<td></td>
<td>".$rlpcust[0]->lap_lg."</td>
</tr>
<tr>
<td>HSL(Unpenetrated)</td>
<td>".$rlpcust[0]->hsl_opp."</td>
<td>".$rlpcust[0]->hsl_called_opp."</td>
<td>".$rlpcust[0]->hsl_pitch."</td>
<td></td>
</tr>
<tr>
<td>Credit Card- New Sourcing</td>
<td>".$rlpcust[0]->cc_eli_new_opp."</td>
<td>".$rlpcust[0]->cc_called_opp."</td>
<td>".$rlpcust[0]->cc_pitch."</td>
<td>".$rlpcust[0]->cc_lg."</td>
</tr>
<tr>
<td>CC Activation</td>
<td>".$rlpcust[0]->cc_activation_opp."</td>
<td>".$rlpcust[0]->cc_activation_called_opp."</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Insurance (Premium) LI </td>
<td>".$rlpcust[0]->li_opp."</td>
<td>".$rlpcust[0]->li_called_opp."</td>
<td></td>
<td></td>
</tr>
<tr>
<td>FD (Unpenetrated) </td>
<td>".$rlpcust[0]->fd_opp."</td>
<td>".$rlpcust[0]->fd_called_opp."</td>
<td>".$rlpcust[0]->fd_pitch."</td>
<td></td>
</tr>
<tr>
<td>LTD Activation - Savings Account</td>
<td>".$rlpcust[0]->ltd_act_saving_opp."</td>
<td>".$rlpcust[0]->ltd_act_saving_called_opp."</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>NB/MB Activations</td>
<td>".$rlpcust[0]->nb_mb_opp."</td>
<td>".$rlpcust[0]->nb_mb_called_opp."</td>
<td>".$rlpcust[0]->nb_mb_pitch."</td>
<td>".$rlpcust[0]->nb_mb_lg."</td>
</tr>
<tr>
<td>Aadhaar Seeding</td>
<td>".$rlpcust[0]->aadhaar_opp."</td>
<td>".$rlpcust[0]->aadhaar_called_opp."</td>
<td>".$rlpcust[0]->aadhaar_pitch."</td>
<td>".$rlpcust[0]->aadhaar_activation."</td>
</tr>
<tr>
<td>Digital Activation</td>
<td>".$rlpcust[0]->digi2_score_opp."</td>
<td>".$rlpcust[0]->digi2_score_called_opp."</td>
<td></td>
<td></td>
</tr>
<tr>
<td>BillPayments</td>
<td>".$rlpcust[0]->digi_billpay_opp."</td>
<td>".$rlpcust[0]->digi_billpay_called_opp."</td>
<td>".$rlpcust[0]->bill_pay_pitch."</td>
<td></td>
</tr>
<tr>
<td>Financial Transactions(Basic Banking)</td>
<td>".$rlpcust[0]->digi_basic_banking_opp."</td>
<td>".$rlpcust[0]->digi_basic_banking_called_opp."</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Digital 2.0 Score(Ecom Shopping Inactive)</td>
<td>".$rlpcust[0]->digi_ecom_shopping_opp."</td>
<td>".$rlpcust[0]->digi_ecom_shopping_called_opp."</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Digital 2.0 Score(Investment Inactive)</td>
<td>".$rlpcust[0]->digi_investment_opp."</td>
<td>".$rlpcust[0]->digi_investment_called_opp."</td>
<td>".$rlpcust[0]->invest_pitch."</td>
<td></td>
</tr>
<tr>
<td>Reduction in Physical Transactions</td>
<td>".$rlpcust[0]->digi_physical_opp."</td>
<td>".$rlpcust[0]->digi_physical_called_opp."</td>
<td></td>
<td></td>
</tr>
</table></div></fieldset>";
return $data;
}
function createOneAssistForm()
{
$dataarr=$this->recruitdata["peopledata"];
$data="<div style='clear:both;margin:2% 0 0 1%;border-style: dotted solid dashed;padding:2%'>
<h5>One Assist Form</h5>
<hr/><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Customer Name</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['firstname']."' id='customer_name'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>Mobile Number</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['mobile']."' id='mobile'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>COD_CUST</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['clientcode']."' id='clientcode'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>UCIC_ID</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['clientcode']."' id='ucicid_clientcode'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>PB CODE</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['client']."' id='client'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>UNIT</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['Unit']."' id='unit'>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>EMAIL1</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='".$dataarr['emailid']."' id='emailid'>
</div>
<div style='width:49%;float:left'>
<label class='label-small_new' style='width:29%;font-weight:bold;'>CUST REMARKS</label>
<input type='text' class='form_new form_new_amend' style='width:50%;border: 2px solid;' value='' id='cust_remarks'>
</div>
</div>
<br><br>
<br><br>
<div style='clear:both;width:100%;'>
<div>
<label class='label-small_new' style='width:14%;font-weight:bold;'>AGENT REMARKS</label>
<textarea class='form_new form_new_amend'style='width:74%;border: 2px solid;' maxlength='512' id='agent_remarks' rows='4'></textarea>
</div>
</div>
<br><br>
<div style='clear:both;width:100%;'>
<input type='button' class='btn btn-default btn-md' style='margin-left:40%;font-weight:bold;' value='Save' id='oneassistformSave'>
</div>
</div>
<script>
$('#oneassistformSave').click(function()
{
var customer_name = $('#customer_name').val();
var clientcode = $('#clientcode).val();
var ucicid_clientcode = $('#ucicid_clientcode').val();
var mobile = $('#mobile').val();
var client = $('#client').val();
var unit = $('#unit').val();
var emailid = $('#emailid').val();
var cust_remarks = $('#cust_remarks').val();
var agent_remarks = $('#agent_remarks').val();
var postdata='varid='+$('#varid').val();
postdata+='&mobile='+'".$dataarr["mobile"]."';
postdata+='&client='+'".$dataarr["client"]."';
postdata+='&clientcode='+'".$dataarr["clientcode"]."';
postdata+='&customer_name='+'".$dataarr["firstname"]."';
postdata+='&ucicid_clientcode='+'".$dataarr["ucicid_clientcode"]."';
postdata+='&unit='+'".$dataarr["Unit"]."';
postdata+='&emailid='+'".$dataarr["emailid"]."';
postdata+='&cust_remarks='+encodeURIComponent(cust_remarks);
postdata+='&agent_remarks='+encodeURIComponent(agent_remarks);
doAjax('oaentryform',postdata,'createtaskdiv','ajaxMutex_recSaveData','singlethis','POST');
});
</script>
";
return $data;
}
function colorCodeRec($id)
{
$fdirty=$this->recruitdata["dirty"];
......@@ -3579,11 +2907,6 @@ function CreateForm(&$frm)
if($tbname=='CLP History')$tabsdata.=$this->createQaireHistTab();
if($tbname=='ComplaintManagement')$tabsdata.=$this->createCompManage();
if($tbname=='ChildCase')$tabsdata.=$this->createChildCase();
//if($tbname=='RacingCustomer')$tabsdata.=$this->createRacingCust();
if($tbname=='Racing Format')$tabsdata.=$this->createRacingCust();
if($tbname=='Lead Entry Form')$tabsdata.=$this->createLeadEntryForm();
if($tbname=='RLP')$tabsdata.=$this->createRLP();
if($tbname=='One Assist')$tabsdata.=$this->createOneAssistForm();
$tabsdata.="</div>";
$i++;
}
......
......@@ -103,9 +103,58 @@ class FrameworkDbSchema extends Migration {
$table->string('userremarks', 5000);
$table->longText('userdata');
$table->string('group', 200)->index('group');
$table->integer('attempt');
$table->string('priority', 10);
$table->longText('question');
});
DB::statement("ALTER TABLE `crmcalls` ADD INDEX(`created_at`);");
Schema::create('crmcalls_archive', function(Blueprint $table)
{
$table->bigIncrements('id');
$table->timestamps();
$table->string('number', 100)->index('number');
$table->integer('user_id')->index('user_id');
$table->integer('sipid_id');
$table->integer('crm_id')->index('crm_id');
$table->string('client', 200)->index('campaign_id');
$table->string('department', 200)->index('list_id');
$table->string('state', 50);
$table->string('hsource', 100);
$table->string('type', 50);
$table->string('statuscode', 20);
$table->string('status', 100)->index('status');
$table->string('substatus', 100);
$table->integer('dialline_id');
$table->string('did', 50)->index('did');
$table->bigInteger('ts_Wait');
$table->bigInteger('ts_Call');
$table->bigInteger('ts_Talk');
$table->bigInteger('ts_Recstart');
$table->bigInteger('ts_Recend');
$table->bigInteger('ts_Dispo');
$table->bigInteger('ts_Close');
$table->integer('waitSec');
$table->integer('callSec');
$table->integer('talkSec');
$table->integer('recstartSec');
$table->integer('recendSec');
$table->integer('dispoSec');
$table->longText('data');
$table->integer('recsize');
$table->string('uniqueid', 100)->index('uniqueid');
$table->string('userstatus', 200)->index('userstatus');
$table->string('usersubstatus', 200);
$table->dateTime('usercallback');
$table->string('userremarks', 5000);
$table->longText('userdata');
$table->string('group', 200)->index('group');
$table->integer('attempt');
$table->string('priority', 10);
$table->longText('question');
});
DB::statement("ALTER TABLE `crmcalls_archive` ADD INDEX(`created_at`);");
Schema::create('crmcampaigns', function(Blueprint $table)
{
$table->bigIncrements('id');
......@@ -365,6 +414,13 @@ class FrameworkDbSchema extends Migration {
$table->dateTime('dialer_lastcall')->index('dialer_lastcall');
$table->integer('crmlist_id')->index('crmlist_id');
$table->string('group', 200)->index('group');
$table->string('bttc', 20);
$table->string('service_vs_product', 30);
$table->string('resolution', 30);
$table->string('satisfaction', 30);
$table->string('final_call_assessment', 30);
$table->longText('question');
$table->string('mf_isa', 30);
});
DB::statement('ALTER TABLE `records` ADD FULLTEXT(`peopledata`);');
......@@ -529,6 +585,15 @@ class FrameworkDbSchema extends Migration {
$table->string('clients', 10000);
});
Schema::create('supervisor_message', function(Blueprint $table) {
$table->bigIncrements("id");
$table->timestamps();
$table->string("sup_id","20");
$table->string("agents","1000");
$table->string("message","500");
$table->string("status","1000");
});
Schema::create('userlogs', function(Blueprint $table)
{
$table->bigIncrements('id');
......@@ -572,8 +637,111 @@ class FrameworkDbSchema extends Migration {
$table->string('exten', 50);
$table->string('extencontext', 100);
$table->string('manager', 200);
$table->string('dialmode_assign', 20);
});
Schema::create('agent_notes', function(Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->integer('user_id');
$table->string('field_1', 100);
$table->string('field_2', 100);
$table->string('field_3', 100);
$table->string('field_4', 100);
$table->string('field_5', 100);
$table->string('field_6', 100);
$table->string('field_7', 100);
$table->string('field_8', 100);
$table->string('field_9', 100);
$table->string('field_10', 100);
$table->string('field_11', 100);
$table->string('field_12', 100);
$table->string('field_13', 100);
$table->string('field_14', 100);
$table->string('field_15', 100);
$table->string('field_16', 100);
$table->string('field_17', 100);
$table->string('field_18', 100);
$table->string('field_19', 100);
$table->string('field_20', 100);
$table->string('field_21', 100);
$table->string('field_22', 100);
$table->string('field_23', 100);
$table->string('field_24', 100);
$table->string('field_25', 100);
$table->string('field_26', 100);
$table->string('field_27', 100);
$table->string('field_28', 100);
$table->string('field_29', 100);
$table->string('field_30', 100);
$table->string('field_31', 100);
$table->string('field_32', 100);
$table->string('field_33', 100);
$table->string('field_34', 100);
$table->string('field_35', 100);
$table->string('field_36', 100);
$table->string('field_37', 100);
$table->string('field_38', 100);
$table->string('field_39', 100);
$table->string('field_40', 100);
$table->string('field_41', 100);
$table->string('field_42', 100);
$table->string('field_43', 100);
$table->string('field_44', 100);
$table->string('field_45', 100);
$table->string('field_46', 100);
$table->string('field_47', 100);
$table->string('field_48', 100);
$table->string('field_49', 100);
$table->string('field_50', 100);
});
Schema::create('full_remark', function(Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->integer('call_id')->index('call_id');
$table->string('fullremark', 5000);
});
Schema::create('authentication_questions', function(Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->integer('question_no');
$table->integer('group_id');
$table->string('question', 200);
$table->string('opt_1', 100);
$table->string('opt_2', 100);
$table->string('opt_3', 100);
$table->string('opt_4', 100);
});
Schema::create('question', function(Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->integer('question_no');
$table->string('questions', 500);
$table->string('opt_1', 200);
$table->string('opt_2', 200);
$table->string('opt_3', 200);
$table->string('opt_4', 200);
$table->string('opt_5', 200);
$table->string('opt_6', 200);
$table->string('opt_7', 200);
$table->string('opt_8', 200);
$table->string('opt_9', 200);
$table->string('opt_10', 200);
$table->string('type', 100);
$table->string('compulsory_qes', 30);
});
Schema::create('question_tree', function(Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->integer('parent_id');
$table->string('parent_opt', 200);
$table->integer('question_id');
$table->integer('priority');
});
$server=Config::get("app.app_ip");
......@@ -687,10 +855,9 @@ class FrameworkDbSchema extends Migration {
\DB::table('sipids')->delete();
$cnt=0;
for($j=1;$j<=20;$j++)
{
$sipids=array();
for($i=(($j*1000)+1);$i<=(($j*1000)+1000);$i++)
for($i=1;$i<=1000;$i++)
{
$sipids[$cnt++]=array(
'id' => $i,
......@@ -705,7 +872,6 @@ class FrameworkDbSchema extends Migration {
);
}
\DB::table('sipids')->insert($sipids);
}
\DB::table('users')->delete();
......@@ -714,7 +880,7 @@ class FrameworkDbSchema extends Migration {
array (
'id' => 1,
'username' => 'admin',
'password' => '$2y$10$rMIU1gBhkyJ4eGSTLOzpJu8AcWDxqkh.P1VKtxxpyGI2uoYRrsyIq',
'password' => '$2y$10$3IMlygICC0e0A0yZpbes.OiWPg41e0r71MkUOLRbSH5bNPlFqOayS',
'fullname' => 'Admin',
'email' => '[email protected]',
'status' => 'Active',
......
-- phpMyAdmin SQL Dump
-- version 4.5.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 24, 2018 at 10:49 AM
-- Server version: 10.0.28-MariaDB
-- PHP Version: 5.6.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `new_kstych_flexydial`
--
-- --------------------------------------------------------
--
-- Table structure for table `complaint_fields`
--
CREATE TABLE `complaint_fields` (
`id` bigint(20) NOT NULL,
`cust_band` varchar(5) NOT NULL,
`cust_type` varchar(50) NOT NULL,
`source_of_info` varchar(50) NOT NULL,
`service_type` varchar(50) NOT NULL,
`priority` varchar(10) NOT NULL,
`category` varchar(200) NOT NULL,
`sub_category` varchar(200) NOT NULL,
`resolving_branch` varchar(100) NOT NULL,
`cust_city` varchar(50) NOT NULL,
`acknowledge` varchar(10) NOT NULL,
`resolve_class_unit` varchar(50) NOT NULL,
`rbb` varchar(100) NOT NULL,
`non_rbb` varchar(100) NOT NULL,
`logging_branch_name` varchar(20) NOT NULL,
`logging_branch_code` varchar(20) NOT NULL,
`resolving_branch_code` int(20) NOT NULL,
`resolving_branch_w_code` varchar(200) NOT NULL,
`logging_branch_w_code` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `complaint_fields`
--
ALTER TABLE `complaint_fields`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `complaint_fields`
--
ALTER TABLE `complaint_fields`
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-- phpMyAdmin SQL Dump
-- version 4.5.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 24, 2018 at 10:49 AM
-- Server version: 10.0.28-MariaDB
-- PHP Version: 5.6.29
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `new_kstych_flexydial`
--
-- --------------------------------------------------------
--
-- Table structure for table `questionaire_details`
--
CREATE TABLE `questionaire_details` (
`id` bigint(10) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`user_id` varchar(10) NOT NULL,
`cust_id` varchar(20) NOT NULL,
`call_id` varchar(20) NOT NULL,
`name` varchar(50) NOT NULL,
`number` bigint(20) NOT NULL,
`question_time` timestamp NULL DEFAULT NULL,
`question` int(10) NOT NULL,
`primary_question` varchar(1500) NOT NULL,
`primary_response` varchar(500) NOT NULL,
`primary_text` varchar(500) NOT NULL,
`followup1_question` varchar(1500) NOT NULL,
`followup1_response` varchar(500) NOT NULL,
`followup1_text` varchar(500) NOT NULL,
`followup2_question` varchar(1500) NOT NULL,
`followup2_response` varchar(500) NOT NULL,
`followup2_text` varchar(500) NOT NULL,
`followup3_question` varchar(1500) NOT NULL,
`followup3_response` varchar(500) NOT NULL,
`followup3_text` varchar(500) NOT NULL,
`followup4_question` varchar(1500) NOT NULL,
`followup4_response` varchar(500) NOT NULL,
`followup4_text` varchar(500) NOT NULL,
`followup5_question` varchar(1500) NOT NULL,
`followup5_response` varchar(500) NOT NULL,
`followup5_text` varchar(500) NOT NULL,
`followup6_question` varchar(1500) NOT NULL,
`followup6_response` varchar(500) NOT NULL,
`followup6_text` varchar(500) NOT NULL,
`followup7_question` varchar(1500) NOT NULL,
`followup7_response` varchar(500) NOT NULL,
`followup7_text` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `questionaire_details`
--
ALTER TABLE `questionaire_details`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `questionaire_details`
--
ALTER TABLE `questionaire_details`
MODIFY `id` bigint(10) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!