EVOLUTION-NINJA
Edit File: lead_report_view.php
<?php $this->load->view('includes/admin_header');?> <script> function load_my_function(id) { $(".su2").attr('disabled', 'disabled'); $(".sub2").text("Submitting..."); $.ajax({ url : '<?php echo site_url("Yaskawa/convert_lead_to_potential_status");?>', type:"POST", data : {'id':id}, success:function(data) { response=jQuery.parseJSON(data); console.log(response); if(response.result == 1) { alert("Lead has been Converted to Potential"); window.location.href = "<?php echo site_url('lead-list'); ?>"; } else { $(".sub2").text("Covert to account"); $(".sub2").removeAttr('disabled'); alert("Something went wrong..Try again"); } } }); } </script> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <div class="main-container ace-save-state" id="main-container"> <script type="text/javascript"> try{ace.settings.loadState('main-container')}catch(e){} </script> <div id="sidebar" class="sidebar responsive ace-save-state"> <script type="text/javascript"> try{ace.settings.loadState('sidebar')}catch(e){} </script> <ul class="nav nav-list" style="width:100%;top:45px;"> <li class=""><a href=""></i><span class="menu-text"><b> LEAD </b></span></a></li> <li class=""><a href=""></i><span class="menu-text" style="color:blue;"> Info </span></a></li> <li class=""><a href=""><span class="menu-text" style="color:blue;"> RELATED LIST </span></a></li> <li class=""><a href="#notes"><span class="menu-text" style="color:blue;"> Notes </span></a></li> <li class=""><a href="#Attachments"><span class="menu-text" style="color:blue;"> Attachments </span></a></li> <li class=""><a href="#Open_Activities"><span class="menu-text" style="color:blue;"> Open Activities </span></a></li> <li class=""><a href="#Closed_Activities"><span class="menu-text" style="color:blue;"> Closed Activities </span></a></li> <li class=""><a href="#Emails"><span class="menu-text" style="color:blue;"> E-Mails </span></a></li> </ul><!-- /.nav-list --> </div> <div class="main-content"> <div class="main-content-inner"> <div class="page-content"> <div class="row"> <div class="col-sm-12"> <!-- PAGE CONTENT BEGINS --> <div class="row"> <div class="col-sm-12 col-md-7"> <ul class="breadcrumb"> <li> <a href="<?php echo site_url('lead-report');?>"><i class="fa fa-long-arrow-left fa-2x"></a></i> </li> </ul> </div> <div class="col-sm-12 col-md-5"> <ul class="breadcrumb"> </ul> </div> </div> </div> <h3 style="margin-left:3%;"><?php echo $single_details->first_name." ".$single_details->lead_last_name;?></h3> <form> <div class="row" style="margin-left:3%;"> <div class="row" style="margin-top:2%;"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Lead Owner :</label> <div class="col-sm-8 col-xs-8"> <span><?php echo $single_details->user_name;?><a href=""></a></span> </div> </div> </div> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Email : </label> <div class="col-sm-8 col-xs-8"> <span><?php echo $single_details->email;?><span><a href=""></a></span></span> </div> </div> </div> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Phone : </label> <div class="col-sm-8 col-xs-8"> <span><?php echo $single_details->phone;?> <span><a href=""></a></span></span> </div> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Mobile :</label> <div class="col-sm-8 col-xs-8"> <span> <?php echo $single_details->mobile;?> <span><a href=""></a></span></span> </div> </div> </div> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Lead Source :</label> <div class="col-sm-8 col-xs-8"> <span> <?php echo $single_details->lead_source;?> <span><a href=""></a></span></span> </div> </div> </div> <!----------service detail--> <!-- <h5>Service Request Details</h5>--> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Service Name :</label> <div class="col-sm-8 col-xs-8"> <span> <?php if(!empty($single_details->service_name)){$decode=json_decode($single_details->service_name); foreach($decode as $val){if(!empty($val)){ echo $val.' ,'; } } } ?> </span> </div> </div> </div> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Service date :</label> <div class="col-sm-8 col-xs-8"> <span> <?php if(!empty($single_details->service_date)){$decode=json_decode($single_details->service_date); foreach($decode as $vals){ if(!empty($vals)){ echo $vals.' ,'; } } } ?></span> </div> </div> </div> <div class="row" > <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4"> Service amount :</label> <div class="col-sm-8 col-xs-8"> <span> <?php if(!empty($single_details->service_amount)){$decode=json_decode($single_details->service_amount); foreach($decode as $vall){ if(!empty($vall)){ echo $vall.' ,'; } } } ?> </span> </div> </div> </div> </div> </form> <!-- hidden CONTENT BEGINS --> <div class="row"> <div class="col-sm-12" style="margin-top:3%;"> <a data-toggle="collapse" data-target="#demo">Hide/Show Details</a> </div> </div> <div id="demo" class="collapse"> <form id="lead_details_update"> <div class="row"> <div class="col-sm-12 "> <h5><b>Lead Information</b></h5> </div> </div> <div class="row"> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Lead Owner</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="hidden" class="form-control" id="lids" name="lids" value="<?php echo $single_details->lead_id;?>"> <select class="form-control" name="lead_owner" id="sel1" required> <option value="">Select</option> <?php foreach($user_details as $val){ if($val->user_name != "All Users"){ ?> <option value="<?php echo $val->user_id; ?>" <?php if ($val->user_id == $single_details->lead_owner) ?> selected ><?php echo $val->user_name;?></option> <?php }} ?> </select> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Company</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="company_name" value="<?php echo $single_details->company_name;?>" required> </div> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Designation</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="col-sm-12" name="lead_title" value="<?php echo $single_details->lead_title;?>" > </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Lead Name</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="last_name" value="<?php echo $single_details->first_name;?>" required> </div> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Phone</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="phone" value="<?php echo $single_details->phone;?>" maxlength="10" pattern="[6-9]{1}[0-9]{9}" title="Phone number with 6-9 and remaing 9 digit with 0-9"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Email</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="email" value="<?php echo $single_details->email;?>" required> </div> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Mobile</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="mobile" value="<?php echo $single_details->mobile;?>" maxlength="10" pattern="[6-9]{1}[0-9]{9}" title="Phone number with 6-9 and remaing 9 digit with 0-9" required> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Fax</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="fax" value="<?php echo $single_details->fax;?>"> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Lead Source</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="lead_source" value="<?php echo $single_details->lead_source;?>"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Website</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="website" value="<?php echo $single_details->website;?>"> </div> </div> </div> <div class="row"> <div class="form-group col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Industry</label> <div class="col-sm-8 col-xs-8 yes_form"> <select type="text" class="form-control" name="industry"> <option value="">Select</option> <?php $industry_details=json_decode($industry_details->field_value);foreach($industry_details as $val){?> <option value="<?php echo $val;?>" <?php if ($single_details->industry == $val) echo "selected='selected'" ?>><?php echo $val;?></option> <?php }?> </select> </div> </div> <div class="col-sm-12 col-md-6"> <label class="col-sm-4">Lead Status</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="col-sm-8" value="<?php echo $single_details->company_name;?>" required> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Annual Revenue</label> <label class="col-sm-1 col-xs-1">Rs.</label> <div class="col-sm-7 col-xs-7 yes_form"> <input type="text" class="form-control " name="annual_revenue" value="<?php echo $single_details->annual_revenue;?>"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">No. of Employees</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="no_of_employees" value="<?php echo $single_details->no_of_employees;?>"> </div> </div> </div> <div class="row"> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">E-Mail Otp Out</label> <div class="col-sm-8 col-xs-8 "> <input type="checkbox" style="width:5%" class="form-control " name="email_otp" <?php if($single_details->email_otp=="YES"){ echo "checked" ; }?> > </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Ratings</label> <div class="col-sm-8 col-xs-8 yes_form"> <select type="text" class="form-control" name="ratings"> <option value="">Select</option> <?php $lead_ratings=json_decode($lead_ratings->field_value);foreach($lead_ratings as $val){?> <option value="<?php echo $val;?>" <?php if ($single_details->ratings == $val) echo "selected='selected'" ?>><?php echo $val;?></option> <?php }?> </select> </div> </div> </div> <!----------------------------------------------------> <div class="row "> <div class="col-sm-6 "> <h5><b>Service Request</b></h5> </div> <div class="col-sm-12 col-md-6"> <label class="col-sm-4 "></label> <button type="button" class="btn more_services">Add more services</button> </div> </div> <?php if(!empty($single_details->service_name)) { $decode=json_decode($single_details->service_name); foreach($decode as $key=>$val){?> <div class="main<?php echo $key ;?>"> <div class="row"> <div class=" col-sm-12 col-md-6"> <label class="col-sm-4">Service Name<span style="color:red" ></span></label> <div class="col-sm-8 yes_form"> <input type="text" name="service_name[]" value="<?php echo $val;?>" class="form-control"> </div> </div> <div class="col-sm-12 col-md-6"> <label class="col-sm-4">Date <span style="color:red"></span></label> <div class="col-sm-8 yes_form"> <?php $decdoe=json_decode($single_details->service_date); ?> <input type="text" name="service_date[]" autocomplete="off" value="<?php foreach($decdoe as $ky=>$vals){ if($ky==$key){ echo $vals; } }?>" class="form-control date_service"> </div> </div> </div> <div class="row"> <div class=" col-sm-12 col-md-6"> <label class="col-sm-4 ">Amount<span style="color:red" ></span></label> <div class="col-sm-8 yes_form"> <?php $decdoe=json_decode($single_details->service_amount); ?> <input type="text" name="service_amount[]" value="<?php foreach($decdoe as $kys=>$valss){ if($kys==$key){ echo $valss; } }?>" class="form-control"> </div> </div> <div class=" col-sm-12 col-md-6"> <label class="col-sm-4 "></label> <div class="col-sm-8 yes_form"> <a onclick="delete_original_div('<?php echo $key; ?>')" href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a> </div> </div> </div> </div> <?php } } ?> <div class="add_mul_services"></div> <!----------------------------------------------------> <div class="row "> <div class="col-sm-12 "> <h5><b>Address Information</b></h5> </div> </div> <div class="row "> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Street</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="street" value="<?php echo $single_details->street;?>"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">City</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="city" value="<?php echo $single_details->city;?>"> </div> </div> </div> <div class="row "> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">State</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="state" value="<?php echo $single_details->state;?>"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Zip Code</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="zip_code" value="<?php echo $single_details->zip_code;?>"> </div> </div> </div> <div class="row "> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Country</label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" class="form-control" name="country" value="<?php echo $single_details->country;?>"> </div> </div> <div class="col-sm-12 col-md-6"> </div> </div> <div class="row"> <div class="col-sm-12 "> <h5><b>Contact Information</b></h5> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Contact person </label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" name="Cperson" value="<?php echo $single_details->Cperson;?>" pattern="([a-zA-Z])+" class="form-control Cperson"> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Contact number </label> <div class="col-sm-8 col-xs-8 yes_form"> <input type="text" name="Cphone" value="<?php echo $single_details->Cphone;?>" pattern="([0-9])+" class="form-control cphone"> </div> </div> </div> <div class="row"> <div class="form-group col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Customer Type</label> <div class="col-sm-8 col-xs-8 yes_form"> <select class="form-control" name="cType"> <option value="">Select</option> <?php foreach($customer_type as $val){ ?> <option value="<?php echo $val->customer_type; ?>" <?php if ($single_details->cType == $val->customer_type) echo "selected='selected'" ?>><?php echo $val->customer_type;?></option> <?php } ?> </select> </div> </div> <div class="col-sm-12 col-xs-12 col-md-6"> <label class="col-sm-4 col-xs-4">Lead Process</label> <div class="col-sm-8 col-xs-8 yes_form"> <select class="form-control" name="lprocess"> <option value="">Select</option> <?php foreach($lead_process as $val){ ?> <option value="<?php echo $val->process_rate; ?>" <?php if($single_details->lprocess==$val->process_rate){ echo "selected"; } ?>><?php echo $val->lead_process;?></option> <?php } ?> </select> </div> </div> </div> <div class="row"> <div class="col-sm-12 "> <h5><b>Description Information</b></h5> </div> </div> <div class="row"> <div class=" col-sm-12 col-xs-12 col-md-12"> <label class="col-sm-2 col-xs-3">Description</label> <div class="col-sm-10 col-xs-7 yes_form"> <textarea class="form-control" rows="2" id="comment" name="description" value="<?php echo $single_details->description;?>"><?php echo $single_details->description;?></textarea> </div> </div> </div> <?php if($single_details->lead_status != 'CONVERTED'){?> <div class="row"> <div class="col-sm-12"> <button type="submit" class="btn btn-primary btn-sm" id="lead_details_updates">Update</button> </div> </div> <?php } ?> </form> </div><!--- hidden content end----> <!---------Notes--------> <!----------Notes------------> <div id="notes" style="margin-top:3%;padding-bottom:5%;"> <h5><a href="javascript:void(0)" class="notes"><b style="margin-left:10px;">Notes</b></a></h5> <h5><a href="javascript:void(1)" class="notes_new"><b style="margin-left:10px;">Notes</b></a></h5> <div id="demo" class="notes-text collapse in form-group col-sm-10" style="background-color:rgba(0,0,0,0.03);padding-top:10px;display:none;"> <div class="timeline-body"> <div class="form-group" > <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?> ?>" ></input> <input type="text" class="form-control center-block" placeholder="Hey! What's up?"> </div> </div> </div> <form id="lead_notes"> <?php if($single_details->lead_status != 'CONVERTED'){?> <div class="notes-area form-group col-sm-10 " style="background-color:rgba(0,0,0,0.03);padding-top:10px;display:none;"> <div class="timeline-body"> <div class="form-group" > <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?> ?>" ></input> <input type="hidden" name="note_id" class="note_id"> <textarea class="form-control center-block note_val" rows="2" placeholder="Hey! What's up?" name="lead_notes"></textarea> <div class="row"> <button type="submit" class="btn btn-primary btn-sm submit" style="float:right;margin-top:10px;margin-right:10px;">Save</button> <div class="" style="float:right;margin-top:10px;margin-right:10px;"> <button class="btn btn-sm" type="button" data-toggle="dropdown">Cancel </button> </div> <a href="#"> <label style="width:2px;height:2px;" > <input type="file" name="attach_file" style="width:2px;height:2px;"> <i class="fa fa-paperclip fa-2x" aria-hidden="true" style="color:black;margin-left:15px;margin-top:10px;"></i> </a> </div> </div> </div> </div> <?php } ?> </form> </div> <!-------notes end--------> <!----------company--------> <div class="row row-form"> <div class="col-sm-10 table-responsive"> <table id="maintable" class="table" > <thead> <!-- <th>Lead Name</th> --> <th>Lead Name</th> <th>Date & Time</th> <th>Notes</th> <th>Updated By</th> <th>Attach File</th> <th>Action</th> <!-- <th>Attached Date</th> --> </thead> <tbody id="table_body"> <?php foreach ($notes_details as $value) { ?> <tr> <!-- <td><?php //echo $value->first_name;?></td> --> <td><?php echo $value->first_name;?></td> <td><?php $val=explode(" ",$value->c_date); $vals=explode("-",$val[0]); echo $vals[2].'-'.$vals[1].'-'.$vals[0].' '.$val[1];?></td> <td><?php echo $value->lead_notes;?></td> <td><?php echo $value->user_name;?> <?php echo $value->last_name;?></td> <td><a title="Click to download" href="<?php echo base_url();?>attach_file/<?php echo $value->attach_file;?>" download="<?php echo $value->attach_file;?>"><?php if($value->attach_file != ""){ echo $value->attach_file;} else {echo "-";}?></a></td> <td> <span class="glyphicon glyphicon-trash" onclick='delete_lead_note(<?php echo $value->notes_id; ?>);' ></span>  <button class="notes_new1" note_id="<?php echo $value->notes_id; ?>" note_value="<?php echo $value->lead_notes;?>">Edit</button></td> </tr> <?php }?> </tbody> </table> </div> </div><!----------companyends--------> <!---------Attachments--------------> <div class="clearfix"></div> <div id="Attachments" class="col-md-10 table-responsive"> <table class="table" style="margin-top:20px;width:100%;"> <tr> <td style="border-bottom:1px solid #ccc;"> <h5><span><b>Attachments</b></span></h5> </td> <?php if($single_details->lead_status != 'CONVERTED'){?> <td style="text-align:right;border-bottom:1px solid #ccc;height:50px;" class=""> <div class="dropdown"> <a href="" class="dropdown-toggle " data-toggle="dropdown">Attach <i class="fa fa-angle-down" aria-hidden="true"></i></a> <ul class="dropdown-menu1" role="menu"> <li><a href="#" data-toggle="modal" data-target="#attach_file">Upload File</a></li> <li class="divider"></li> <li> <a data-toggle="modal" data-target="#link_url">Link URL</a></li> </ul> </div> </td> <?php }?> </tr> <tr> <div class="row row-form"> <div class="col-sm-3 table-responsive"> <table id="maintable" class="table" > <thead> <!-- <th>Lead Name</th> --> <th>Attached Type</th> <th>Attach File</th> <th>Attached URL</th> <th>Attached Date</th> </thead> <tbody id="table_body"> <?php foreach ($attachment_details as $value) { ?> <tr> <!-- <td><?php //echo $value->first_name;?></td> --> <td><?php echo $value->type;?></td> <td><a title="Click to download" href="<?php echo base_url();?>attach_file/<?php echo $value->attach_file;?>" download="<?php echo $value->attach_file;?>"><?php if($value->attach_file !=""){echo $value->attach_file;} else {echo "-";}?></a></td> <td><a target="_blank" href="http://<?php if($value->link_url !=""){ echo $value->link_url;} else {echo "-";}?>"><?php if($value->link_url !=""){ echo $value->link_url;} else {echo "-";}?></a></td> <td><?php echo date('d-m-Y', strtotime($value->created_at));?></td> </tr> <?php }?> </tbody> </table> </div> </div> </tr> </table> </div><!----------attachments ends-------> <!--------------Open Activities----------------> <div id="Open_Activities" class="col-md-10 table-responsive"> <table class="" style="margin-top:30px;width:100%;"> <tr> <td style="border-bottom:1px solid #ccc;"> <h5><span><b>Open Activities</b></span></h5> </td> <td style="text-align:right;border-bottom:1px solid #ccc;height:50px;" class=""> </td> </tr> <?php if($single_details->lead_status != 'CONVERTED'){?> <tr> <td style="border-bottom:1px solid #ccc;height:50px;"><input type="hidden" ></input><span></span> <a href="#" data-toggle="modal" data-target="#event1" style="padding:0px 10px;">New Tasks</a> <a href="#" data-toggle="modal" data-target="#event2" style="padding:0px 10px;">New Event</a> <a href="#" data-toggle="modal" data-target="#event3" style="padding:0px 10px;">New Call</a></td> <td style="border-bottom:1px solid #ccc;" ><input type="hidden" ></input></td> </tr> <?php }?> </table> </div><!--Open_Activities--> <!-------ivoice and quatetion---> <div class="row row-form"> <div class="col-sm-10 table-responsive"> <table id="maintable" class="table" > <thead> <th>Type</th> <th>Subject</th> <th>Status</th> <th>Due Date</th> <th>From Date</th> <th>To Date</th> <th>Call Start Time</th> <?php if($single_details->lead_status != 'CONVERTED'){?> <th>Close Activity</th> <?php }?> </thead> <tbody id="table_body"> <?php foreach ($lead_details as $value) { ?> <tr> <td><?php echo $value->type;?></td> <td><?php echo $value->subject;?></td> <td><?php echo $value->status;?></td> <td><?php if($value->due_date != "0000-00-00"){echo $value->due_date;} else {echo "-";}?></td> <td><?php if($value->start_date != "0000-00-00"){echo $value->start_date;} else {echo "-";}?></td> <td><?php if($value->end_date != "0000-00-00"){ echo $value->end_date;} else {echo "-";}?></td> <td><?php if($value->type=="Call"){ echo $value->call_duration; } else {echo "-";}?></td> <?php if($single_details->lead_status != 'CONVERTED'){?> <td><a href="<?php echo site_url("closed-activity/")?><?php echo $value->task_id;?>"><button type="button" class="btn btn-primary btn-xs">Close</button></a></td> <?php }?> </tr> <?php }?> </tbody> </table> </div> </div><!-----------open activity end-----------> <!--------------closed activity------------> <div id="Closed_Activities" class="col-md-10 table-responsive"> <table class="" style="margin-top:30px;width:100%;"> <tr> <td style="border-bottom:1px solid #ccc;"> <h5><span><b>Closed Activities</b></span></h5> </td> <td style="text-align:right;border-bottom:1px solid #ccc;height:50px;" class=""> </td> </tr> <tr> <div class="row row-form"> <div class="col-sm-10 table-responsive"> <table id="maintable" class="table" > <thead> <th>Type</th> <th>Subject</th> <th>Status</th> <th>Due Date</th> <th>From Date</th> <th>To Date</th> <th>Call Start Time</th> </thead> <tbody id="table_body"> <?php foreach ($closed_details as $value) { ?> <tr> <td><?php echo $value->type;?></td> <td><?php echo $value->subject;?></td> <td><?php echo $value->status;?></td> <td><?php if($value->due_date != "0000-00-00"){echo $value->due_date;} else {echo "-";}?></td> <td><?php if($value->start_date != "0000-00-00"){echo $value->start_date;} else {echo "-";}?></td> <td><?php if($value->end_date != "0000-00-00"){ echo $value->end_date;} else {echo "-";}?></td> <td><?php if($value->type=="Call"){ echo $value->call_duration; } else {echo "-";}?></td> </tr> <?php }?> </tbody> </table> </div> </div> </tr> </table> <div id="quotation" class="col-md-12" style="margin-top:3%;"> <h5><a href="javascript:void(2)" class="table11-show"><span><b>Quotation</b></span></a></h5> <div class="col-md-10"> <div class="row"> <div id="addele_more"> <div class="table-responsive"> <table class="table table111-click" id="maintable"> <thead> <tr id="column_id"> <!-- <th><input type="checkbox" id="checkall"> Select All</input></th> --> <th>Quotation number</th> <th>Quotation Amount</th> <th>Quotation date</th> <th>Probability</th> <th>Quotation description</th> </tr> </thead> <tbody> <?php if($quotation_details!= '') { $i=1; $j=1;foreach($quotation_details as $value){?> <tr class="hoverr click-on"> <!-- <td><input type="checkbox" class="checkthis" /></td> --> <td><?php echo $value->quotation_number;?></td> <td><?php echo $value->amount;?></td> <td> <div class="input-group date"> <input type="text" placeholder="Date" value="<?php echo date("d-m-Y", strtotime($value->quo_date)); ?>" style="border:none;width:70% !important;"></input> </div> </td> <td> <div class="input-group date"> <span style="font-size:16px;">Progress</span> <input type="hidden" value="<?php echo $value->probability; ?>" id="probability_<?php echo $j;?>"> <div id="jq_<?php echo $i;?>"></div> </div> </td> <td><?php $resStr1 = str_replace('"', ' ', $value->description); $resStr2 = str_replace('[', ' ', $resStr1); $resStr3 = str_replace(']', ' ', $resStr2); echo $resStr3; ?></td> </tr> <?php $i++; $j++;} } ?> </tbody> </table> </div> </div> </div> </div> </div> <div id="invoice" class="col-md-12" style="margin-top:3%;"> <h5><a href="javascript:void(0)" class="table-show1"><span><b>Invoice</b></span></a></h5> <div class="col-md-10"> <div class="row"> <div id="addele_more"> <div class="table-responsive"> <table class="table table-click1" id="maintable"> <thead> <tr id="column_id"> <th><input type="checkbox" id="checkall"> Select All</input></th> <th>Invoice number</th> <th>Invoice date</th> <th>Quotation number</th> <th>Quotation date</th> <th>Invoice Amount</th> <th>Invoice Attachment</th> <th>Description</th> </tr> </thead> <tbody> <?php foreach($converted_status as $value){?> <tr class="hoverr click-on"> <td><input type="checkbox" class="checkthis" /></td> <td><?php echo $value->invoice_no;?></td> <td> <div class="input-group date" > <?php echo date("d-m-Y", strtotime($value->invoice_date)); ?> </div> </td> <td><?php ?></td> <td> <div class="input-group date" > <?php ?> </div> </td> <td><?php echo number_format($value->total);?></td> <td><?php ?></td> <td><?php $desc=json_decode($value->description); if(!empty($desc)){foreach($desc as $val){ echo $val;} }?></td> </tr> <?php }?> </tbody> </table> </div> </div> </div> </div> </div> <!-------------------------------> <!------------email ------------------> <div id="Emails" class="col-md-10 table-responsive"> <table class="" style="margin-top:30px;width:100%;"> <tr> <td style="border-bottom:1px solid #ccc;"> <h5><span><b>Emails</b></span></h5> </td> <?php if($single_details->lead_status != 'CONVERTED'){?> <td style="text-align:right;border-bottom:1px solid #ccc;height:50px;" class=""> <a href="<?php echo base_url('send-mail');?>" target="new"><i class="fa fa-plus" aria-hidden="true"></i> Send Mail</a> </td> <?php }?> </tr> <tr> <td style="border-bottom:1px solid #ccc;height:50px;"><input type="hidden" ></input></td> <td style="border-bottom:1px solid #ccc;" ><input type="hidden" ></input></td> </tr> </table> </div><!----------Emails end-------------> </div><!-----Closed_Activities ends-----> </div> <div class="footer"> <div class="footer-inner"> <div class="footer-content"> <span class="bigger-120"> <span class="blue">All Right Reserved © 2020</span> <a href=""> Jay Blues Technologies</a> </span> </div> </div> </div> </div><!-- /.row --> </div><!-- /.page-content --> </div> </div><!-- /.main-content --> <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> </a> </div><!-- /.main-container --> <script src="<?php echo base_url('admin_assets/assets/js/ace-elements.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/assets/js/ace.min.js');?>"></script> <!----------- all modals starts here ------------> <!-- attach file --> <div class="modal fade" id="attach_file" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Attach File</h4> </div> <form id="lead_attach"> <div class="modal-body"> <div class="row"> <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?>"></input> <div> <input id="fileupload" type="file" style="margin-left:15px;" name="attach_file" multiple="multiple" required="required"/> <div id="dvPreview"> </div> </div> <div class="text-center"> <button type="submit" class="btn btn-primary btn-sm" style="margin-top:20px;margin-right:20px;">Save</button> <button type="submit" class="btn btn-primary btn-sm" style="margin-top:20px;margin-right:20px;">Cancel</button> </div> </div> </div> </form> </div> </div> </div> <!-- url --> <div class="modal fade" id="link_url" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Attach From Link</h4> </div> <form id="linkurl"> <div class="modal-body"> <div class="row"> <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?>"></input> <div class="col-sm-2"> <label>Enter URL</label> </div> <div class="col-sm-10"> <input type="text" name="linkurl" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></input> </div> <!-- <div class="col-sm-9"> <input type="text" name="link_url" style="width:80%;border:none !important;border-bottom:1px solid #777 !important"> <!-- <input type="text" name="link_url" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></input> </div> --> <div class="text-center"> <button type="submit" class="btn btn-primary btn-sm" style="margin-top:20px;margin-right:20px;">Save</button> <button type="submit" class="btn btn-primary btn-sm" style="margin-top:20px;margin-right:20px;">Cancel</button> </div> </div> </div> </form> </div> </div> </div> <!-- event1 --> <div class="modal fade" id="event1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Add New Task</h4> </div> <form id="new_task"> <div class="modal-body"> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Subject</label> </div> <div class="col-sm-9"> <input type="text" name="subject" style="width:80%;border:none !important;border-bottom:1px solid #ddd !important" required="required"></input> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Due Date</label> </div> <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?>"></input> <div class="col-sm-9"> <div class="input-group date" > <input type="text" name="due_date" data-provide="datepicker" class="datepick" placeholder="Date" style="border:none;width:80% !important;" required="required"></input> </div> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Priority</label> </div> <div class="col-sm-9"> <select name="priority" style="width:80%;border:none !important;border-bottom:1px solid #ddd !important" required="required"> <option value="High">High</option> <option value="Highest">Highest</option> <option value="Low">Low</option> <option value="Lowest">Lowest</option> <option value="Normal">Normal</option> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Owner</label> </div> <div class="col-sm-9"> <select name="owner" style="width:80%;border:none !important;border-bottom:1px solid #ddd !important" required="required"> <?php foreach($user_details as $val){ if($val->user_name != "All Users"){ ?> <option value="<?php echo $val->user_name;?>" ><?php echo $val->user_name;?></option> <?php } }?> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Status</label> </div> <div class="col-sm-9"> <select name="status" style="width:80%;border:none !important;border-bottom:1px solid #ddd !important" required="required"> <option value="Not Started">Not Started</option> <option value="Deferred">Deferred</option> <option value="In Progress">In Progress</option> <option value="Completed">Completed</option> <option value="Waiting on someone else">Waiting on someone else</option> </select> </div> </div> <div class="text-center"> <button type="submit" class="btn btn-primary" style="margin-top:20px;margin-right:20px;">Save</button> <!-- <a href="" class="btn btn-primary" style="margin-top:20px;margin-right:20px;" >Save</a> --> <button type="button" class="btn btn-primary" data-dismiss="modal" style="margin-top:20px;margin-right:20px;">Cancel</button> </div> </div> </form> </div> </div> </div> <!-- event2 --> <div class="modal fade" id="event2" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Event Information</h4> </div> <form id="new_events"> <div class="modal-body"> <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?>"></input> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>New Event</label> </div> <div class="col-sm-9"> <input type="text" placeholder="location" name="event_name" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"></input> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>All day</label> </div> <div class="col-sm-9"> <input type="checkbox" name="all_day" id="hide_calander"></input> </div> </div> <div class="row" style="padding-bottom:20px;" id="fromdate"> <div class="col-sm-3"> <label>From</label> </div> <div class="col-sm-9"> <div class="input-group date" style="width:80%;"> <input type="text" class="datepick" data-provide="datepicker" id="from_date" name="from_date" placeholder="Date" style="border:none;border-bottom:1px solid #ddd !important;width:100% !important;"></input> </div> </div> </div> <div class="row" style="padding-bottom:20px;" id="todate"> <div class="col-sm-3"> <label>To</label> </div> <div class="col-sm-9"> <div class="input-group date" style="width:80%;"> <input type="text" class="datepick" data-provide="datepicker" id="to_date" placeholder="Date" name="to_date" style="border:none;border-bottom:1px solid #ddd !important;width:100% !important;"></input> </div> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Host</label> </div> <div class="col-sm-9"> <select name="host" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"> <option value="">Select</option> <?php foreach($user_details as $val) if($val->user_name !="All Users"){{ ?> <option value="<?php echo $val->user_name;?>"><?php echo $val->user_name;?></option> <?php } }?> </select> </div> </div> <!-- <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Participants</label> </div> <div class="col-sm-9"> <input type="text" style="width:80%;border:none !important;border-bottom:1px solid #777 !important"></input> </div> </div> --> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Related To</label> </div> <div class="col-sm-9"> <select name="related_to" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"> <option value="Lead">Lead</option> <option value="Contact">Contact</option> <option value="Others">Others</option> <option value="None">None</option> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Lead</label> </div> <div class="col-sm-9"> <input type="text" name="lead" value="<?php echo $single_details->first_name;?>"style="width:80%;border:none !important;border-bottom:1px solid #777 !important"></input> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Description</label> </div> <div class="col-sm-9"> <input type="text" name="description" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"></input> </div> </div> <div class="text-center"> <button type="submit" class="btn btn-primary" style="margin-top:20px;margin-right:20px;">Save</button> <!-- <a href="" class="btn btn-primary" style="margin-top:20px;margin-right:20px;" >Save</a> --> <button type="button" class="btn btn-primary" data-dismiss="modal" style="margin-top:20px;margin-right:20px;">Cancel</button> </div> </div> </form> </div> </div> </div> <!-- event3 --> <div class="modal fade" id="event3" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Create Call</h4> </div> <form id="new_calls"> <div class="modal-body"> <input type="hidden" name="lead_id" value="<?php echo $single_details->lead_id;?>"></input> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Subject</label> </div> <div class="col-sm-9"> <input type="text" name="subject" required="required" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></input> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Type</label> </div> <div class="col-sm-9"> <select name="call_type" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"> <option value="Outbond">Outbond</option> <option value="Inbond">Inbond</option> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Purpose</label> </div> <div class="col-sm-9"> <select name="call_purpose" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"> <option value="None">None</option> <option value="Prospecting">Prospecting</option> <option value="Administrative">Administrative</option> <option value="Negotiation">Negotiation</option> <option value="Demo">Demo</option> <option value="Project">Project</option> <option value="Support">Support</option> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Contact Name</label> </div> <div class="col-sm-9"> <select name="contact_name" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" required="required"> <option value="Lead">Lead</option> <option value="Contact">Contact</option> </select> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Details</label> </div> <div class="col-sm-9"> <div class="row" required="required"> <div class="col-sm-4"> <input type="checkbox" name="call_details" value="Current Call"> Current Call </div> <div class="col-sm-4"> <input type="checkbox" name="call_details" value="Completed Call"> Completed Call </div> <div class="col-sm-4"> <input type="checkbox" name="call_details" value="Schedule Call"> Schedule Call </div> </div> </div> </div> <!-- <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Timer</label> </div> <div class="col-sm-9"> <input type="text" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></input> </div> </div> --> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Duration</label> </div> <div class="col-sm-9"> <div class="input-group bootstrap-timepicker" style="width:80%;"> <input id="timepicker1" name="call_duration" type="text" class="form-control" required="required"/> <span class="input-group-addon"> <i class="fa fa-clock-o bigger-110"></i> </span> </div> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Description</label> </div> <div class="col-sm-9"> <textarea type="text" name="description" required="required" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></textarea> </div> </div> <div class="row" style="padding-bottom:20px;"> <div class="col-sm-3"> <label>Call Result</label> </div> <div class="col-sm-9"> <input type="text" name="call_result" required="required" style="width:80%;border:none !important;border-bottom:1px solid #777 !important" ></input> </div> </div> <div class="text-center"> <button type="submit" class="btn btn-primary" style="margin-top:20px;margin-right:20px;">Save</button> <!-- <a href="" class="btn btn-primary" style="margin-top:20px;margin-right:20px;">Save</a> --> <button type="button" class="btn btn-primary" data-dismiss="modal" style="margin-top:20px;margin-right:20px;">Cancel</button> </div> </div> </form> </div> </div> </div> </body> </html> <link rel="stylesheet" href="<?php echo base_url('admin_assets/css/jquery-ui.css'); ?>"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <!-- <link rel="stylesheet" href="<?php echo base_url('admin_assets/css/datepicker3.css');?>" />--> <link rel="stylesheet" href="<?php echo base_url('admin_assets/css/fullcalendar.min.css');?>" /> <link rel="stylesheet" href="<?php echo base_url('admin_assets/assets/css/bootstrap-timepicker.min.css');?>" /> <script src="<?php echo base_url('admin_assets/assets/js/bootstrap-timepicker.min.js');?>"></script> <!-- <script src="<?php echo base_url('admin_assets/event/assets/js/chart.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/event/assets/js/chart-data.js');?>"></script> --> <!--<script src="<?php echo base_url('admin_assets/event/assets/js/bootstrap-datepicker.js');?>"></script>--> <script src="<?php echo base_url('admin_assets/event/assets/js/moment.min.js');?>"></script> <script src="<?php echo base_url('admin_assets/event/assets/js/fullcalendar.min.js');?>"></script> <link rel="stylesheet" href="<?php echo base_url('admin_assets/css/jquery.lineProgressbar.css');?>"> <script src="<?php echo base_url('admin_assets/js/jquery.lineProgressbar.js');?>"></script> <link href="https://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css"> <link href="<?php echo base_url('admin_assets/css/jquery.lineProgressbar.css');?>" rel="stylesheet" type="text/css"> <script src="<?php echo base_url('admin_assets/js/jquery.lineProgressbar.js');?>"></script> <script type="text/javascript"> $('.more_services').click(function(){ var con=''; con+='<div class="new_div">'; con+='<div class="row">'; con+='<div class=" col-sm-12 col-md-6">'; con+='<label class="col-sm-4">Service Name<span style="color:red" ></span></label>'; con+='<div class="col-sm-8 yes_form">'; con+='<input type="text" name="service_name[]" class="form-control" required>'; con+='</div>'; con+='</div>'; con+='<div class="col-sm-12 col-md-6">'; con+='<label class="col-sm-4">Date <span style="color:red"></span></label>'; con+='<div class="col-sm-8 yes_form">'; con+='<input type="text" name="service_date[]" class="form-control date_services11" required>'; con+='</div>'; con+='</div>'; con+='</div>'; con+='<div class="row">'; con+='<div class=" col-sm-12 col-md-6">'; con+='<label class="col-sm-4 ">Amount<span style="color:red" ></span></label>'; con+='<div class="col-sm-8 yes_form">'; con+='<input type="text" name="service_amount[]" class="form-control" required>'; con+='</div>'; con+='</div>'; con+='<div class=" col-sm-12 col-md-6">'; con+='<label class="col-sm-4 "></label>'; con+='<a class="remove" href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a>'; con+='</div>'; con+='</div>'; con+='</div>'; $('.add_mul_services').append(con); $('.date_services11').datepicker({ changeMonth:true, changeYear:true, yearRange: "1940:c", // dateFormat: 'yy-mm-dd' dateFormat: 'dd-mm-yy' }); $(".remove").click(function(){ $(this).closest('.new_div').remove(); }); }); $('.date_service').datepicker({ changeMonth:true, changeYear:true, yearRange: "1940:c", // dateFormat: 'yy-mm-dd' dateFormat: 'dd-mm-yy' }); $(document).ready(function(){ $('.notes_new1').click(function(e){ e.preventDefault(); var note_id=$(this).attr('note_id'); var note_value=$(this).attr('note_value'); $("textarea.note_val").val(note_value); $('.note_id').val(note_id); $('.notes').hide(); $('.notes-area').show(); $('.notes_new').show(); $('input[name=lead_notes]').val(); }); $('#lead_details_update').submit(function(e){ e.preventDefault(); //alert(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("yaskawa/lead_details_update")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1){ alert("Update Successfully"); location.reload(); }else{ alert("Date not update"); } } }); }); }); $(".Cperson").autocomplete({ source: function( request, callback ) { var val=$('.Cperson').val(); var type = 'post' $.ajax({ type:type, url: '<?php echo site_url('yaskawa/search_contact'); ?>', data: {'val':val}, success: function( data ) { data=jQuery.parseJSON(data); multiple:true; callback($.map(data, function(vx){ return [ { label: vx.first_name + ":" +vx.contact_id, value: vx.first_name + ":" +vx.contact_id, } ]; })); } }); }, minLength: 1, select: function( event, ui ) { $('.Cperson').val( ui.item.label); $('.Cperson').val( ui.item.value); address(); return { value: ui.item.value }; }, open: function() { // Do something on open event. }, close: function() { // Do something on close event } }); function address(){ var val=$('.Cperson').val(); var name=val.split(':'); var n=name[0]; var id=name[1]; var type = 'post' $.ajax({ type:type, url: '<?php echo site_url('yaskawa/get_contact_number'); ?>', data: {'id':id}, success: function( data ) { data=jQuery.parseJSON(data); $(".cphone").val(data.mobile); } }); } </script> <script> $(document).ready(function() { var iprocess=$('#iprocess').val(); $('#jq').LineProgressbar({ percentage:iprocess, radius: '3px', height: '20px' }); }); </script> <script> $('.upload_image').change(function(e){ e.preventDefault(); $('#edit_profile').submit(); }); function delete_lead_note(id){ var id = id; swal({ title: "Are you sure?", text: "You will not be able to recover this data!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", cancelButtonText: "No, cancel plz!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); $.ajax({ url:"<?php echo site_url("/yaskawa/delete_attach_notes")?>", type:"POST", data:{id:id}, success:function(response) { response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { toastr["success"]("Deleted successfully"); } } }); } else { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); } }); } $('#edit_profile').submit(function(e){ e.preventDefault(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("yaskawa/lead_upload_image");?>', data : formdata, contentType: false, processData: false, success:function(response){ resp=jQuery.parseJSON(response); console.log(response); if(resp.result == 1) { alert("Update Successfully"); //$('#myModal').modal().hide(); location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); </script> <script> $(document).ready(function() { var readURL = function(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('.my_profile-pic').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $(".file-upload").on('change', function(){ readURL(this); }); $(".upload-button").on('click', function() { $(".file-upload").click(); }); }); function convert_fun() { $(".sub1").attr('disabled', 'disabled'); $(".sub1").text("Submitting..."); var id=$("#lids").val(); $.ajax({ url : '<?php echo site_url("Yaskawa/convert_status");?>', type:"POST", data : {'id':id}, async:false, success:function(data) { if(data == 1) { alert("Lead has been Converted"); window.location.href = "<?php echo site_url(); ?>/lead-list"; } else { alert("Something went wrong..Try again"); $(".sub1").text("Covert to account"); $(".sub1").removeAttr('disabled'); } } }); } $(document).on('click','.converted',function() { alert("Lead Converted Already"); }); </script> <script type="text/javascript"> // $(function () { // $('#datetimepicker1').datetimepicker(); // }); $('#lead_notes').submit(function(e){ e.preventDefault(); $(".submit").attr('disabled', 'disabled'); $(".submit").text("Submitting..."); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("attach-notes")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); alert("Added Successfully"); window.location.reload(); } else if(response.result == 2) { alert("Updated Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#lead_attach').submit(function(e){ e.preventDefault(); // alert(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("attach-files")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#linkurl').submit(function(e){ e.preventDefault(); // alert('hi'); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("yaskawa/attach_linl_url")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#new_task').submit(function(e){ e.preventDefault(); // alert('hi'); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("yaskawa/new_task")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#new_events').submit(function(e){ e.preventDefault(); //alert('hi'); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("new-events")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#new_calls').submit(function(e){ e.preventDefault(); //alert('hi'); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("new-calls")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); $('#upload_pic').submit(function(e){ e.preventDefault(); // alert(); formdata = new FormData($(this)[0]); $.ajax({ type : 'post', url : '<?php echo site_url("upload-profile-pic")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { alert("Profile Pic Added Successfully"); window.location.reload(); } else { alert("Something went wrong..Try again"); } } }); }); </script> <style type="text/css"> .dropdown-menu1 { position: absolute; top: 100%; right: 0; z-index: 1000; display: none; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; font-size: 14px; text-align: left; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0,0,0,.15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); box-shadow: 0 6px 12px rgba(0,0,0,.175); background-clip: padding-box; } .open>.dropdown-menu1 { display: block; } .dropdown-menu1>li>a { clear: both; font-weight: 400; color: #333; } .dropdown-menu1>li>a { font-size: 13px; padding-left: 11px; padding-right: 11px; padding-bottom: 4px; margin-bottom: 1px; margin-top: 1px; } input[type='file'] { opacity:1; } .ui-datepicker { width :19% !important; } </style> <style type="text/css"> .yes_form input{ width:100% !important; border:none !important; border-bottom:1px solid gray !important; margin-bottom:5%; } .yes_form select{ width:100% !important; border:none !important; border-bottom:1px solid gray !important; margin-bottom:5%; } .yes_form textarea{ width:100% !important; border:none !important; border-bottom:1px solid gray !important; margin-bottom:5%; } .footer .footer-inner .footer-content { border-top: 0px double #E5E5E5 !important; } </style> <script type="text/javascript"> $(document).ready(function(){ $('#hide_calander').click(function(){ if($(this).prop("checked") == true) { $("#fromdate").hide(); $("#todate").hide(); } else { $("#fromdate").show(); $("#todate").show(); } }); }); </script> <script type="text/javascript"> var span = document.querySelectorAll('.NameHighlights'); for (var i = span.length; i--;) { (function () { var t; span[i].onmouseover = function () { hideAll(); clearTimeout(t); this.className = 'NameHighlightsHover'; }; span[i].onmouseout = function () { var self = this; t = setTimeout(function () { self.className = 'NameHighlights'; }, 300); }; })(); } function hideAll() { for (var i = span.length; i--;) { span[i].className = 'NameHighlights'; } }; </script> <script type="text/javascript"> $('.notes_new').hide(); $('.notes').click(function(){ $('.notes_new').toggle(); $('.notes').hide(); $('.notes-text').toggle(); }); $('.notes_new').click(function(){ $('.notes_new').hide(); $('.notes').show(); $('.notes-text').hide(); $('.notes-area').hide(); }); $('.notes-text').click(function(){ $(this).hide(); $('.notes-area').show(); $('.notes_new').show(); }); //date picker </script> <link rel="stylesheet" href="<?php echo base_url('admin_assets/assets/css/bootstrap-timepicker.min.css');?>" /> <script src="<?php echo base_url('admin_assets/assets/js/bootstrap-timepicker.min.js');?>"></script> <script type="text/javascript"> $('#timepicker1').timepicker({ minuteStep: 1, showSeconds: true, showMeridian: false, disableFocus: true, icons: { up: 'fa fa-chevron-up', down: 'fa fa-chevron-down' } }).on('focus', function() { $('#timepicker1').timepicker('showWidget'); }).next().on(ace.click_event, function(){ $(this).prev().focus(); }); </script> <script> function delete_original_div(id) { $('.main'+id).empty(); } $('.datepick').datepicker({ format: "dd-mm-yyyy", }).on('changeDate', function(ev){ $('.datepick').datepicker('hide'); }); $('#from_date').on('change', function(){ var date = $(this).val(); $('#to_date').datepicker({ dateFormat: 'dd-mm-yy', minDate: date, }); }); </script>