?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Exits/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/draft/application/views/Exits/edit_leave.php |
<script type="text/javascript"> function showhide(status) { var divvalue = status.value; if(divvalue == "Approved") $('#alert_div').show(); else $('#alert_div').hide(); } function disable_ending(status) { if(status.value=='3') { $("#leave_ending_date").attr("disabled", "disabled"); } } </script> <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $salary = $this->mastermodel->get_employee_current_salary($viewinfo->employee_id); $camp = $this->mastermodel->get_employee_current_camp($viewinfo->employee_id); $site = $this->mastermodel->get_employee_current_site($viewinfo->employee_id); $leave_list=$this->mastermodel->getdatas('leave_type','leave_type_name'); ?> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('exits','viewinexitssearch','search_leave','view_leave','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Update Employee Leave Details</span> </div> <fieldset> <?php $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('exits/addinexits/update_leave/view_leave/1',$attributes); $employee = $this->administrationmodel->get_emp_info($viewinfo->employee_id); if($employee->emp_non_no[0]==',') { $employee->emp_non_no=substr($employee->emp_non_no, 1); } $emp_non_no = str_replace(',',', ', $employee->emp_non_no); ?> <ul> <li> <label for="data">Select Employee</label> <div class="record_entry"> <?php echo $employee->emp_non_full_name; ?> </div> <input type="hidden" name="employee_id" id="employee_id" value="<?=$viewinfo->employee_id;?>"/> <input type="hidden" name="leave_id" id="leave_id" value="<?=$viewinfo->leave_id;?>"/> <input type="hidden" name="tab_name" id="tab_name" value="leave"/> </li> <li> <label for="data">Employee No</label> <div class="record_entry"> <?php echo $emp_non_no; ?> </div> </li> <li> <label for="data">Joining Date</label> <div class="record_entry"> <?php echo $employee->emp_non_date_joining; ?> </div> </li> <li> <label for="data">Trade</label> <div class="record_entry"> <?php echo $employee->trade_name; ?> </div> </li> <li> <label for="data">Camp</label> <div class="record_entry"> <?php echo $camp; ?> </div> </li> <li> <label for="data">Current Basic Salary</label> <div class="record_entry"> <?php echo $salary; ?> </div> </li> <li> <label for="data">Site</label> <div class="record_entry"> <?php echo $site; ?> </div> </li> <li> <label for="data">Leave Type</label> <select name="leave_type_id" id="leave_type_id" class="required" onchange="disable_ending(this)"> <option value="">Select</option> <?php foreach($leave_list as $leave) { echo "<option value='". $leave['leave_type_id'] . "'";if($viewinfo->leave_type_id == $leave['leave_type_id'] ){echo "selected";} echo ">" . $leave['leave_type_name'] . "</option>"; } ?> </select> </li> <li> <label for="data">Reason of leave</label> <select name="leave_reason" id="leave_reason" class="required"> <option value="">Select</option> <option value="Relative sick" <?php if($viewinfo->leave_reason == "Relative sick" ) {echo "selected";} ?> >Relative sick</option> <option value="Personal problems" <?php if($viewinfo->leave_reason == "Personal problems" ) {echo "selected";} ?> >Personal problems</option> <option value="Completion of contract" <?php if($viewinfo->leave_reason == "Completion of contract" ) {echo "selected";} ?> >Completion of contract</option> <option value="Disciplinary Ground" <?php if($viewinfo->leave_reason == "Disciplinary Ground" ) {echo "selected";} ?> >Disciplinary Ground</option> <option value="Missing / Absconding">Missing / Absconding</option> <option value="Any other reason" <?php if($viewinfo->leave_reason == "Any other reason" ) {echo "selected";} ?> >Any other reason</option> </select> </li> <li> <label for="data">Remarks</label> <?php $data = array( 'name' => 'remarks', 'id' => 'remarks', 'value' => $viewinfo->remarks ); echo form_textarea($data).form_error($data); ?> </li> <li> <table class="sort"> <caption>Leave Dates</caption> <tr> <th align="center">Start Date</th> <th align="center">End Date</th> </tr> <tr> <td> <div id="multi"> <input type="text" name="leave_starting_date" id="leave_starting_date" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->leave_starting_date);?>" /> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </td> <td> <div id="multi"> <input type="text" name="leave_ending_date" id="leave_ending_date" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->leave_ending_date);?>" /> <img src="<?=base_url()?>assets/images/icons/calendar.png" alt="Click to popup the clendar!" /> </div> </td> </tr> </table> </li> <li> <label for="data">Tickets</label> <select name="leave_ticket" id="leave_ticket" class="required"> <option value="">Select</option> <option value="Company provided" <?php if($viewinfo->leave_ticket == "Company provided" ) {echo "selected";} ?> >Company provided</option> <option value="Self Arrangement" <?php if($viewinfo->leave_ticket == "Self Arrangement" ) {echo "selected";} ?> >Self Arrangement</option> </select> </li> <li> <table class="sort"> <caption>Destination</caption> <tr> <th align="center">From</th> <th align="center">To</th> </tr> <tr> <td> <input type="text" name="leave_from" id="leave_from" value="<?=$viewinfo->leave_from;?>" /> </td> <td> <input type="text" name="leave_to" id="leave_to" value="<?=$viewinfo->leave_to;?>" /> </td> </tr> </table> </li> <li> <label for="data">Leave Application Form</label> <?php $data = array( 'name' => 'leave_application_form_name', 'id' => 'leave_application_form_name', 'value' => $viewinfo->leave_application_form_name ); $data1 = array( 'name' => 'leave_application_form_doc', 'id' => 'leave_application_form_doc' ); echo form_input($data).form_error($data); echo form_upload($data1).form_error($data1); ?> <?php if($viewinfo->leave_application_form_doc != "") { ?> <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->leave_application_form_doc;?>">Download</a> <?php } ?> </li> <li> <label for="data">Documentary Proof of emergency</label> <?php $data = array( 'name' => 'proof_emergency_name', 'id' => 'proof_emergency_name', 'value' => $viewinfo->proof_emergency_name ); $data1 = array( 'name' => 'proof_emergency_doc', 'id' => 'proof_emergency_doc' ); echo form_input($data).form_error($data); echo form_upload($data1).form_error($data1); ?> <?php if($viewinfo->proof_emergency_doc != "") { ?> <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->proof_emergency_doc;?>">Download</a> <?php } ?> </li> <li> <label for="data">Clearance form</label> <?php $data = array( 'name' => 'clearence_form_name', 'id' => 'clearence_form_name', 'value' => $viewinfo->clearence_form_name ); $data1 = array( 'name' => 'clearence_form_doc', 'id' => 'clearence_form_doc' ); echo form_input($data).form_error($data); echo form_upload($data1).form_error($data1); ?> <?php if($viewinfo->clearence_form_doc != "") { ?> <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->clearence_form_doc;?>">Download</a> <?php } ?> </li> <li> <label for="data">Self declaration</label> <?php $data = array( 'name' => 'self_declaration_name', 'id' => 'self_declaration_name', 'value' => $viewinfo->self_declaration_name ); $data1 = array( 'name' => 'self_declaration_doc', 'id' => 'self_declaration_doc' ); echo form_input($data).form_error($data); echo form_upload($data1).form_error($data1); ?> <?php if($viewinfo->self_declaration_doc != "") { ?> <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->self_declaration_doc;?>">Download</a> <?php } ?> </li> <li> <label for="data">Settlement sheet</label> <?php $data = array( 'name' => 'settlement_sheet_name', 'id' => 'settlement_sheet_name', 'value' => $viewinfo->settlement_sheet_name ); $data1 = array( 'name' => 'settlement_sheet_doc', 'id' => 'settlement_sheet_doc' ); echo form_input($data).form_error($data); echo form_upload($data1).form_error($data1); ?> <?php if($viewinfo->settlement_sheet_doc != "") { ?> <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->settlement_sheet_doc;?>">Download</a> <?php } ?> </li> <li> <label for="data">Leave Status</label> <select name="leave_status" id="leave_status" class="required" onchange="showhide(this)" > <option value="">Select</option> <option value="Not Approved" <?php if($viewinfo->leave_status == "Not Approved" ) {echo "selected";} ?> >Not Approved</option> <option value="Approved" <?php if($viewinfo->leave_status == "Approved" ) {echo "selected";} ?> >Approved</option> </select> </li> <div style="display:none;" id="alert_div"> <li> <table class="sort"> <caption>Send Alert to</caption> <tr> <th align="center">Select</th> <th align="center">Username</th> <th align="center">Designation</th> </tr> <?php $i=1; $user_list = $this->mastermodel->get_alert_users('26'); foreach ($user_list as $user) { ?> <tr> <td style="width:15px;" > <input type="checkbox" name="select_user_<?=$i;?>" checked /> </td> <td> <input type="hidden" name="user_id_<?=$i;?>" value="<?=$user['id'];?>"/> <?=$user['username'];?> </td> <td> <?=$user['designation_name'];?> </td> </tr> <?php $i++; } ?> </table> </li> </div> <li> <li> <label for="submit"> </label> <button type="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>