<table width="100%" class="table m-table nowrap table-header-fixed table-striped table-bordered table-hover table-header-fixed" id="salary_slip_view_table">
  <thead>
    <tr class="">
      <th>Sl No</th>
      <th>Slip Id</th>
      <th>Employee Name</th>
      <th>Designation</th>
      <th>Month</th>
      <th>Slip Under</th>
      <th>Project</th>
      <th>Worked Nos</th>
      <th>Basic Wage</th>
      <?php if($this->config->item('HR_salary_slip_template')!=3){ ?>
        <th>Overtime</th>
        <th>Overtime Rate</th>
        <th>Overtime Amt</th>
      <?php }else{ ?>
        <th>Total Basic Wage<br/></th>
        <th>Bonus<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_bonus_percent')."%)";} ?>
        <th>Tiffin Allowance<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item("Currency_currency_format").$this->config->item('HR_salary_tiffin_allowance_per_day')."/Day)";} ?>
        <th>Overtime<br/>Hours</th>
        <th>Overtime<br/>Amount</th>
        <th>HRA<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_hra_percent')."%)";} ?>
        <th>CEB<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_ceb_percent')."%)";} ?>
        <th>EL<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_el_percent')."%)";} ?>
        <th>Total</th>
        <th>PF<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_pf_percent')."%)";} ?>
        <th>ESI<br/><?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_esi_percent')."%)";} ?>
      <?php } ?>
      <th>Allowance</th>
      <th>Incentive</th>
      <th>Bonus</th>
      <th>Deductions</th>
      <th>NET Salary<br/>Amount</th>
      <th>Total Paid<br/>(Advance)</th>
      <th>Total Paid<br/>(Arrear)</th>
      <th>Total Paid</th>
      <th>Balance to Pay</th>
      <th>Payment Status</th>
      <th>Remarks</th>
      <th>Creation</th>
      <th>Actions</th>
      <th>Slip ID</th>
      <th>Employee ID</th>
      <th>Work ID</th>
      <th>Month</th>
      <th>Slip Under</th>
      <th>Basic Wage</th>
      <th>Basic Wage Type</th>
      <th>overtime</th>
      <th>overtime period</th>
      <th>overtime rate</th>
      <th>Worked Nos</th>
      <th>Basic Wage Fixed</th>
      <th>Holidays</th>
      <th>medical leave</th>
      <th>absent</th>
      <th>Month Days</th>
      <th>Hourly Rate</th>
      <th>regular Hour</th>
      <th>daily work Hour</th>
      <th>Approval Status</th>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>

<div class="modal fade" tabindex="-1" id="salary_slip_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content" style="width: 750px">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Create New Salary Slip
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="salary_slip" id="form_salary_slip_add" data-modal-id="salary_slip_add_modal" method="post" action="<?php echo base_url().'salary_slips/create'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_salary_slip_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6">
              <div class="m-form__group form-group" >
                <label class="col-form-label">Salary Slip Under</label>
                <div class="m-radio-inline">
                  <?php if($page_name!='work_profile'){ ?>
                    <label class="m-radio m-radio--solid m-radio--state-brand">
                      <input required type="radio" name="salary_slip_type" value="Office"> Office Expense
                      <span></span>
                    </label>
                  <?php } ?>
                  <label class="m-radio m-radio--solid m-radio--state-success">
                    <input type="radio"  <?php if($page_name=='work_profile'){ echo "required"." "."checked"; }?> name="salary_slip_type" value="Project"> Project Expense
                    <span></span>
                  </label>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6" style="display: none;" id="salary_slip_work_div_add">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Work Name
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select  style="width: 100%" class="form-control m-select2 form_salary_slip_add_select" id="salary_slip_work_add"  name="work_id" data-placeholder="Select Work">
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($works as $row): ?>
                    <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="row" style="padding-left: 15px;padding-right: 15px;">
          <div class="col-lg-5 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Employee
              </label>
              <div class="m-select2 m-select2--air m-select2--pill">
                <select required style="width: 100%" class="form-control m-select2  form_salary_slip_add_select salary_add_calculate_fields" id="salary_slip_employee_add" name="employee"  >
                  <option selected disabled>Select Employee</option>
                  <?php
                  foreach($employees as $row):
                    ?>
                    <option value="<?php echo $row->employee_id?>"><?php echo $row->employee_name." [".$row->user_designation."]"?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-2 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Month
              </label>
              <div class="input-group m-input-group--air m-input-group--pill  date">
                <input value="<?php echo date('M Y')?>"  data-date-format="mm-yyyy" id="salary_slip_month_add" required type="text" name="month" class="form-control  m-input " placeholder="Month" >
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-5">
            <div class="row">
              <div class="col-lg-6 padding-0">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Basic Wage
                  </label>
                  <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                    <input value="0" required type="text" name="basic_wage" id="salary_slip_basic_wage_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Basic Wage" aria-describedby="basic-addon1">
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-6 padding-0">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Type
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select required style="width: 100%" class="form-control m-select2  form_salary_slip_add_select salary_add_calculate_fields" id="salary_slip_basic_wage_type_add" name="basic_wage_type"  >
                      <option selected disabled>Select Type</option>
                      <option value="Hourly">Hourly</option>
                      <option value="Daily" selected>Daily</option>
                      <option value="Monthly">Monthly</option>
                    </select>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <?php if($this->config->item('HR_salary_slip_template')==1){ ?>
          <div class="row monthly_fields_salary_add" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Month Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="<?php echo date("t")?>" type="text" name="month_days" id="salary_slip_month_days_add"  class=" form_salary_slip_add_fields_2 salary_add_calculate_fields form-control m-input" placeholder="Days in Month" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Hourly Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="hourly_rate" id="salary_slip_hourly_rate_add"  class=" form_salary_slip_add_fields_2  form-control m-input" placeholder="Hourly Rate" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help">* <?php echo $this->config->item('HR_daily_working_hour'); ?> Hours in a Day</span>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="row">
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Public Holidays</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="holidays" id="salary_slip_public_holidays_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Holidays" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Medical Leave</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="medical_leave" id="salary_slip_medical_leave_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Medical Leave" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Absent</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="absent" id="salary_slip_absent_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Absent" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row" style="padding-left: 15px;padding-right: 15px;">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_add_1">Worked Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_add_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend" >
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control  salary_add_calculate_fields" id="salary_slip_overtime_type_add" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_add_1">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_add">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php }elseif($this->config->item('HR_salary_slip_template')==2){ ?>
          <div class="row monthly_fields_salary_add" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Month Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="<?php echo date("t")?>" type="text" name="month_days" id="salary_slip_month_days_add"  class=" form_salary_slip_add_fields_2 salary_add_calculate_fields form-control m-input" placeholder="Days in Month" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_add_1">Worked Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_add_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Basic Wage Payable
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="basic_wage_payable_amount" id="salary_slip_basic_wage_payable_amount_add"  class="form_salary_slip_add_fields_1 form-control m-input" placeholder="Basic Wage Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend" >
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control  salary_add_calculate_fields" id="salary_slip_overtime_type_add" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" id="overtime_rate_div_add">
                    <label for="user_name" id="worked_type_add_1">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_add">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php }elseif($this->config->item('HR_salary_slip_template')==3){ ?>
          <div class="row monthly_fields_salary_add" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Worked Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_add_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Total Basic Wage
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="total_basic_wage" id="salary_slip_total_basic_wage_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Basic Wage" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Bonus <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_bonus_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="bonus_amount" id="salary_slip_bonus_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Bonus Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Tiffin Allowance <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item("Currency_currency_format").$this->config->item('HR_salary_tiffin_allowance_per_day')."/Day)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="tiffin_amount" id="salary_slip_tiffin_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Tiffin Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend" >
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control  salary_add_calculate_fields" id="salary_slip_overtime_type_add" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0" style="display:none">
                  <div class="form-group m-form__group" >
                    <label for="user_name">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_add">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt <span id="salary_slip_overtime_rate_info_add"></span>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      HRA <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_hra_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="hra_amount" id="salary_slip_hra_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="HRA Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      CEB <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_ceb_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="ceb_amount" id="salary_slip_ceb_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="CEB Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      EL <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_el_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="el_amount" id="salary_slip_el_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="EL Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Total Salary
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="total_salary" id="salary_slip_total_salary_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Total" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      PF <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_pf_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="pf_amount" id="salary_slip_pf_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="PF Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      ESI <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_esi_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="esi_amount" id="salary_slip_esi_amount_add"  class="salary_slip_template_3_fields salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="ESI Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php }elseif($this->config->item('HR_salary_slip_template')==4){ ?>
          <div class="row monthly_fields_salary_add" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Total Paid Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="<?php echo date("t")?>" type="text" name="month_days" id="salary_slip_month_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" placeholder="Days in Month" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Paid Holidays</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="holidays" id="salary_slip_paid_holidays_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Max Payable Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="max_payable_days" id="salary_slip_max_payable_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Net Paid Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="net_paid_days" id="salary_slip_net_paid_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Paid Leaves</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="paid_leaves" id="salary_slip_paid_leaves_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Weekly Off (SUN)</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly  type="text" name="weekly_off_days" id="salary_slip_weekly_off_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Working Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="working_days" id="salary_slip_working_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >LWP Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="lwp_days" id="salary_slip_lwp_days_add"  class=" form_salary_slip_add_fields_3 salary_add_calculate_fields form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Present Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" readonly required type="text" name="worked_nos" id="salary_slip_worked_nos_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_3  form-control m-input" placeholder="Present Days" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_add_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Total Basic Salary <?php echo "(".$this->config->item('HR_salary_basic_salary_percent')."%)"; ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="total_basic_wage" id="salary_slip_total_basic_wage_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_3 form-control m-input" placeholder="Basic Wage" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      HRA <?php echo "(".$this->config->item('HR_salary_hra_percent')."%)"; ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="hra_amount" id="salary_slip_hra_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="HRA Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Conv. Allowance <?php  echo "(".$this->config->item('HR_salary_conveyance_allowance_percent')."%)"; ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="conv_allowance_amt" id="salary_slip_conv_allowance_amt_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Special Allowance <?php  echo "(".$this->config->item('HR_salary_special_allowance_percent')."%)"; ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="special_allowance_amount" id="salary_slip_special_allowance_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input"  aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      City Comp. Alwnc <?php echo "(".$this->config->item('HR_salary_city_compensatory_allowance_percent')."%)"; ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly id="salary_slip_city_compensatory_amount_add" value="0" required type="text" name="city_compens_amount" id="salary_slip_city_compensatory_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="HRA Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend" >
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control  salary_add_calculate_fields" id="salary_slip_overtime_type_add" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0" style="display:none">
                  <div class="form-group m-form__group" >
                    <label for="user_name">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_add">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt <span id="salary_slip_overtime_rate_info_add"></span>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Total Earnings
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="total_salary" id="salary_slip_total_salary_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_3 form-control m-input" placeholder="Total" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      PF <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_pf_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="pf_amount" id="salary_slip_pf_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="PF Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      ESI <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_esi_percent')."%)";} ?>
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="esi_amount" id="salary_slip_esi_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="ESI Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      LWP Amount
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="lwp_amount" id="salary_slip_lwp_amount_add"  class="form_salary_slip_add_fields_3 salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="ESI Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php } ?>
        <div class="row" style="padding-left: 15px;padding-right: 15px;">
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Extra Allowance
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="allowance" id="salary_slip_allowance_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Allowance Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Incentive
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="incentive" id="salary_slip_incentive_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Incentive Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Bonus
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="bonus" id="salary_slip_bonus_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Bonus Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Salary
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text"  id="salary_slip_total_salary_add"  class="form_salary_slip_add_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>

        </div>
        <div class="row">
          <div class="col-lg-3 ">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Extra Deductions
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="deductions" id="salary_slip_deductions_add"  class="salary_add_calculate_fields form_salary_slip_add_fields_1 form-control m-input" placeholder="Deductions Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                NET Salary Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text" name="total_wage" id="salary_slip_payable_amount_add"  class="form_salary_slip_add_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Advance Paid Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="advance_paid" readonly id="salary_slip_advance_amount_add"  class="form_salary_slip_add_fields_1 form-control m-input salary_add_calculate_fields" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 ">
            <div class="form-group m-form__group" >
              <label for="user_name">
                NET Payable Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text" name="payable_amount" id="salary_slip_total_payable_amount_add"  class="form_salary_slip_add_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-lg-12">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Remarks
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <i class="la la-edit"></i>
                  </span>
                </div>
                <input  type="text" name="remarks"  class="form-control m-input form_salary_slip_add_fields" placeholder="Salary Slip Remarks" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>

        </div>
        <input type="hidden" value="<?php echo $this->config->item('HR_daily_working_hour'); ?>" name="daily_work_hour" id="salary_slip_daily_work_hour_add"  />
        <input type="hidden" value="1" name="basic_wage_fixed" id="salary_slip_basic_wage_fixed_add" />
        <input type="hidden" name="hourly_rate_2" id="salary_slip_hourly_rate_add_2" />
        <input type="hidden" name="regular_hours" id="salary_slip_regular_hours_add" />

        <div class="m-form__seperator m-form__seperator--dashed" style="border-top: 1px dashed #c4c4c4;margin-bottom: 20px"></div>
        <div style="background: white;border: 4px solid #f7f7fa;padding: 0px;margin: 0px;padding-bottom: 0px">
          <div class="m-section" style="margin: 0px 0 10px 0;">
            <h3 class="m-section__heading" style="padding: 10px;margin: 0px">Transaction Details</h3>
            <div class="row" style="padding-top: 15px" >
              <div class="col-lg-4" >
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Paid Amount
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input required type="text" name="paid_amount" id="salary_slip_paid_amount_add" value="0" class="form-control m-input m-input--pill m-input--air salary_add_calculate_fields form_salary_slip_add_fields" placeholder="Paid Amount" aria-describedby="basic-addon1">
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-4">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Paid Date
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input data-date-format="dd-mm-yyyy" id="salary_slip_paid_date_add"  type="text" name="paid_date" class="form_salary_slip_add_fields form-control m-input m-input--pill m-input--air salary_slip_paid_amount_req_fields " placeholder="Paid Date" >
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-4">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Paid From Acc
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select id="salary_slip_debit_acc_add" name="debit_acc" style="width: 100%" class="form-control m-input form_salary_slip_add_select salary_slip_paid_amount_req_fields"  aria-describedby="basic-addon1">
                      <?php
                      foreach($this->config->item('account_heads') as $row):
                        $selected="";
                        if($row->acc_head_id==1){
                          $selected="selected";
                        }
                        ?>
                        <option <?php echo $selected?> value="<?php echo $row->acc_head_id?>"><?php echo $row->acc_head_name?></option>
                        <?php
                      endforeach;
                      ?>
                    </select>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            </div>
            <div class="row" >
              <div class="col-lg-4">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Payment Mode
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select id="salary_slip_payment_mode_add" name="payment_mode" style="width: 100%" class="form-control m-input form_salary_slip_add_select salary_slip_paid_amount_req_fields"  aria-describedby="basic-addon1">
                      <option selected disabled>Select Payment Mode</option>
                      <?php
                      foreach($this->config->item('payment_modes') as $row):
                        ?>
                        <option value="<?php echo $row?>"><?php echo $row?></option>
                        <?php
                      endforeach;
                      ?>
                    </select>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-4" >
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    TR Reference No
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input type="text" name="reference_no"  class="form-control m-input m-input--pill m-input--air form_salary_slip_add_fields" placeholder="Reference No" aria-describedby="basic-addon1">
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-4">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    TR Reference Date
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input type="text" data-date-format="dd-mm-yyyy" name="reference_date" id="salary_slip_reference_date_add"  class="form-control m-input m-input--pill m-input--air form_salary_slip_add_fields" placeholder="Reference Date" aria-describedby="basic-addon1">
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-tag"></i></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            </div>
            <div class="row">
              <div class="col-lg-8" >
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Transaction Remarks
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input type="text" name="tr_remarks" class="form-control m-input m-input--pill m-input--air form_salary_slip_add_fields" placeholder="Transaction Remarks" aria-describedby="basic-addon1">
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-4" >
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Balance Amount
                  </label>
                  <div class="m-input-icon m-input-icon--right">
                    <input readonly type="text" name="balance_amount" id="salary_slip_balance_amount_add" class="form-control m-input m-input--pill m-input--solid m-input--air form_salary_slip_add_fields" placeholder="Balance Amount" value="0" aria-describedby="basic-addon1">
                    <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">
          Close
        </button>
        <button type="submit" class="btn btn-primary form_submit_btn">
          Submit
        </button>
      </div>
    </form>
  </div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="salary_slip_edit_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content" style="width: 750px">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Edit Salary Slip
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="salary_slip" id="form_salary_slip_edit" data-modal-id="salary_slip_edit_modal" method="post" action="<?php echo base_url().'salary_slips/update'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_salary_slip_edit_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6">
              <div class="m-form__group form-group" >
                <label class="col-form-label">Salary Slip Under</label>
                <div class="m-radio-inline">
                  <?php if($page_name!='work_profile'){ ?>
                    <label class="m-radio m-radio--solid m-radio--state-brand">
                      <input required type="radio" name="salary_slip_type_edit" value="Office"> Office Expense
                      <span></span>
                    </label>
                  <?php } ?>
                  <label class="m-radio m-radio--solid m-radio--state-success">
                    <input type="radio"  <?php if($page_name=='work_profile'){ echo "required"." "."checked"; }?> name="salary_slip_type_edit" value="Project"> Project Expense
                    <span></span>
                  </label>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6" style="display: none;" id="salary_slip_work_div_edit">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Work Name
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select  style="width: 100%" class="form-control m-select2 form_salary_slip_edit_select" id="salary_slip_work_edit"  name="work_id" data-placeholder="Select Work">
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($works as $row): ?>
                    <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="row" style="padding-left: 15px;padding-right: 15px;">
          <div class="col-lg-5 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Employee
              </label>
              <div class="m-select2 m-select2--air m-select2--pill">
                <select required style="width: 100%" class="form-control m-select2  form_salary_slip_edit_select salary_edit_calculate_fields" id="salary_slip_employee_edit" name="employee"  >
                  <option selected disabled>Select Employee</option>
                  <?php
                  foreach($employees as $row):
                    ?>
                    <option value="<?php echo $row->employee_id?>"><?php echo $row->employee_name." [".$row->user_designation."]"?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-2 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Month
              </label>
              <div class="input-group m-input-group--air m-input-group--pill  date">
                <input value="<?php echo date('M Y')?>"  data-date-format="mm-yyyy" id="salary_slip_month_edit" required type="text" name="month" class="form-control  m-input salary_edit_calculate_fields" placeholder="Month" >
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-5">
            <div class="row">
              <div class="col-lg-6 padding-0">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Basic Wage
                  </label>
                  <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                    <input value="0" required type="text" name="basic_wage" id="salary_slip_basic_wage_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Basic Wage" aria-describedby="basic-addon1">
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
              <div class="col-lg-6 padding-0">
                <div class="form-group m-form__group" >
                  <label for="user_name">
                    Type
                  </label>
                  <div class="m-select2 m-select2--air m-select2--pill">
                    <select required style="width: 100%" class="form-control m-select2  form_salary_slip_edit_select salary_edit_calculate_fields" id="salary_slip_basic_wage_type_edit" name="basic_wage_type"  >
                      <option selected disabled>Select Type</option>
                      <option value="Hourly">Hourly</option>
                      <option value="Daily" selected>Daily</option>
                      <option value="Monthly">Monthly</option>
                    </select>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            </div>
          </div>
        </div>
        <?php if($this->config->item('HR_salary_slip_template')==1){ ?>
          <div class="row monthly_fields_salary_edit" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Month Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input  type="text" name="month_days" id="salary_slip_month_days_edit"  class=" form_salary_slip_edit_fields_2 salary_edit_calculate_fields form-control m-input" placeholder="Days in Month" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Hourly Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly type="text" name="hourly_rate" id="salary_slip_hourly_rate_edit"  class=" form_salary_slip_edit_fields_2  form-control m-input" placeholder="Hourly Rate" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help" id="salary_slip_hourly_rate_edit_info"></span>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="row">
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Public Holidays</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="holidays" id="salary_slip_public_holidays_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Holidays" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Medical Leave</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="medical_leave" id="salary_slip_medical_leave_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Medical Leave" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name" >Absent</label>
                        <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                          <input value="0" type="text" name="absent" id="salary_slip_absent_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Absent" aria-describedby="basic-addon1">
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="row" style="padding-left: 15px;padding-right: 15px;">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_edit_1">Worked Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_edit_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control  salary_edit_calculate_fields" id="salary_slip_overtime_type_edit" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_edit_1">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_edit">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        <?php }elseif($this->config->item('HR_salary_slip_template')==2){ ?>
          <div class="row monthly_fields_salary_edit" style="padding-left: 15px;padding-right: 15px;display:none">
            <div class="col-lg-12">
              <div class="row">
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" >Month Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input  type="text" name="month_days" id="salary_slip_month_days_edit"  class=" form_salary_slip_edit_fields_2 salary_edit_calculate_fields form-control m-input" placeholder="Days in Month" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_edit_1">Worked Days</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="worked_type_edit_2">Days</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Basic Wage Payable
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="basic_wage_payable_amount" id="salary_slip_basic_wage_payable_amount_edit"  class="form_salary_slip_edit_fields_1 form-control m-input" placeholder="Basic Wage Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Details
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime" id="salary_slip_overtime_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" style="padding: 0px;width: 90px">
                          <select required style="width: 100%" class="form-control   salary_edit_calculate_fields" id="salary_slip_overtime_type_edit" name="overtime_type"  >
                            <?php
                            $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                            foreach ($overtime_types as $key => $value) { ?>
                              <option selected value="<?php echo $value?>"><?php echo $value?></option>
                            <?php } ?>
                          </select>
                        </span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name" id="worked_type_edit_1">Overtime Rate</label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
                      <div class="input-group-prepend">
                        <span class="input-group-text" id="overtime_rate_type_show_edit">/Hour</span>
                      </div>
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
                <div class="col-lg-3 padding-0">
                  <div class="form-group m-form__group" >
                    <label for="user_name">
                      Overtime Amt
                    </label>
                    <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                      <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
                    </div>
                    <span class="m-form__help"></span>
                  </div>
                </div>
              </div>
            </div>
          </div>
<?php }elseif($this->config->item('HR_salary_slip_template')==3){ ?>
  <div class="row monthly_fields_salary_edit" style="padding-left: 15px;padding-right: 15px;display:none">
    <div class="col-lg-12">
      <div class="row">
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name" >Worked Days</label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input value="1" required type="text" name="worked_nos" id="salary_slip_worked_nos_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Worked Nos" aria-describedby="basic-addon1">
              <div class="input-group-prepend">
                <span class="input-group-text" id="worked_type_edit_2">Days</span>
              </div>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Total Basic Wage
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="total_basic_wage" id="salary_slip_total_basic_wage_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Basic Wage" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Bonus <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_bonus_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="bonus_amount" id="salary_slip_bonus_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Bonus Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Tiffin Allowance <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item("Currency_currency_format").$this->config->item('HR_salary_tiffin_allowance_per_day')."/Day)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="tiffin_amount" id="salary_slip_tiffin_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Tiffin Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Overtime Details
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input value="0" required type="text" name="overtime" id="salary_slip_overtime_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime" aria-describedby="basic-addon1">
              <div class="input-group-prepend" >
                <span class="input-group-text" style="padding: 0px;width: 90px">
                  <select required style="width: 100%" class="form-control  salary_edit_calculate_fields" id="salary_slip_overtime_type_edit" name="overtime_type"  >
                    <?php
                    $overtime_types = explode(',',$this->config->item('HR_salary_slip_overtime_types'));
                    foreach ($overtime_types as $key => $value) { ?>
                      <option selected value="<?php echo $value?>"><?php echo $value?></option>
                    <?php } ?>
                  </select>
                </span>
              </div>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0" style="display:none">
          <div class="form-group m-form__group" >
            <label for="user_name">Overtime Rate</label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input value="0" required type="text" name="overtime_rate" id="salary_slip_overtime_rate_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_2  form-control m-input" placeholder="Overtime Rate" aria-describedby="basic-addon1">
              <div class="input-group-prepend">
                <span class="input-group-text" id="overtime_rate_type_show_edit">/Hour</span>
              </div>
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Overtime Amt <span id="salary_slip_overtime_rate_info_edit"></span>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="overtime_amount" id="salary_slip_overtime_amount_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Overtime Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              HRA <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_hra_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="hra_amount" id="salary_slip_hra_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="HRA Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              CEB <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_ceb_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="ceb_amount" id="salary_slip_ceb_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="CEB Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              EL <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_el_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="el_amount" id="salary_slip_el_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="EL Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              Total Salary
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="total_salary" id="salary_slip_total_salary_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Total" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              PF <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_pf_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="pf_amount" id="salary_slip_pf_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="PF Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
        <div class="col-lg-3 padding-0">
          <div class="form-group m-form__group" >
            <label for="user_name">
              ESI <?php if($this->config->item('HR_salary_slip_template_3_fields_editable')==0){ echo "(".$this->config->item('HR_salary_esi_percent')."%)";} ?>
            </label>
            <div class="input-group m-input-group m-input-group--pill m-input-group--air">
              <input readonly value="0" required type="text" name="esi_amount" id="salary_slip_esi_amount_edit"  class="salary_slip_template_3_fields salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="ESI Amt" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
        </div>
      </div>
    </div>
  </div>
        <?php } ?>
        <div class="row" style="padding-left: 15px;padding-right: 15px;">
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Allowance
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="allowance" id="salary_slip_allowance_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Allowance Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Incentive
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="incentive" id="salary_slip_incentive_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Incentive Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Bonus
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="bonus" id="salary_slip_bonus_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Bonus Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Salary
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text" id="salary_slip_total_salary_edit"  class="form_salary_slip_edit_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>

        </div>
        <div class="row">
          <div class="col-lg-3 ">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Deductions
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input value="0" required type="text" name="deductions" id="salary_slip_deductions_edit"  class="salary_edit_calculate_fields form_salary_slip_edit_fields_1 form-control m-input" placeholder="Deductions Amt" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                NET Salary Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text" name="total_wage" id="salary_slip_payable_amount_edit"  class="form_salary_slip_edit_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 padding-0">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Advance Paid Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input required type="text" name="advance_paid" readonly id="salary_slip_advance_amount_edit"  class="form_salary_slip_edit_fields_1 form-control m-input salary_edit_calculate_fields" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3 ">
            <div class="form-group m-form__group" >
              <label for="user_name">
                NET Payable Amount
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <?php echo $this->config->item('Currency_currency_format'); ?>
                  </span>
                </div>
                <input readonly value="0" required type="text" name="payable_amount" id="salary_slip_total_payable_amount_edit"  class="form_salary_slip_edit_fields_1 form-control m-input" placeholder="Total Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-lg-12">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Remarks
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <div class="input-group-prepend">
                  <span class="input-group-text" id="basic-addon1">
                    <i class="la la-edit"></i>
                  </span>
                </div>
                <input  type="text" name="remarks" id="salary_slip_remarks_edit"  class="form-control m-input form_salary_slip_edit_fields" placeholder="Salary Slip Remarks" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="m-form__seperator m-form__seperator--dashed" style="border-top: 1px dashed #c4c4c4;margin-bottom: 20px"></div>
        <div class="row">
          <div class="col-lg-6">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Paid
              </label>
              <div class="m-input-icon m-input-icon--right">
                <input type="text" readonly="" id="salary_slip_total_paid_edit" class="form-control m-input m-input--pill m-input--air form_salary_slip_edit_fields" aria-describedby="basic-addon1">
                <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-6">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Balance
              </label>
              <div class="m-input-icon m-input-icon--right">
                <input type="text" readonly="" id="salary_slip_balance_edit" class="form-control m-input m-input--pill m-input--air form_salary_slip_edit_fields" aria-describedby="basic-addon1">
                <span class="m-input-icon__icon m-input-icon__icon--right"><span><?php echo $this->config->item('Currency_currency_format'); ?></span></span>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
      </div>
      <input type="hidden" name="daily_work_hour" id="salary_slip_daily_work_hour_edit"  />
      <input type="hidden" name="basic_wage_fixed" id="salary_slip_basic_wage_fixed_edit" />
      <input type="hidden" name="hourly_rate_2" id="salary_slip_hourly_rate_edit_2" />
      <input type="hidden" name="regular_hours" id="salary_slip_regular_hours_edit" />
      <input type="hidden" name="salary_id" id="salary_slip_id_edit" />
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">
          Close
        </button>
        <button type="submit" class="btn btn-primary form_submit_btn">
          Submit
        </button>
      </div>
    </form>
  </div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="salary_slip_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form id="form_salary_slip_delete" data-form-type="salary_slip" data-modal-id="salary_slip_delete_modal" autocomplete="off" method="post" action="<?php echo base_url().'salary_slips/delete'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-danger" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Delete this Data ?. All the Associated Data will Lost. </p>
          <p>
            <button class="btn btn-danger form_submit_btn" type="submit" name="submit">Confirm & Delete</button>
            <button type="button" class="btn btn-primary modal-dismiss" data-dismiss="modal">Cancel</button>
          </p>
          <input type="hidden" name="salary_id" id="salary_slip_id_delete">
        </div>
      </div>
    </form>
  </div>
</div>
