<?php $this->view("includes/Inc_pagehead");?>
<!-- Page Styles Goes Here-->
<style>
.m-form .m-form__group {
  padding-top: 0px;
  padding-bottom: 0px;
}
</style>
<?php $this->view("includes/Inc_navigation");?>
<div class="m-grid__item m-grid__item--fluid m-wrapper">
  <!-- BEGIN: Subheader -->
  <div class="m-subheader ">
    <div class="d-flex align-items-center">
      <div class="mr-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          Add New Salary Slip
        </h3>
        <ul class="m-subheader__breadcrumbs m-nav m-nav--inline">
          <li class="m-nav__item m-nav__item--home">
            <a href="#" class="m-nav__link m-nav__link--icon">
              <i class="m-nav__link-icon la la-home"></i>
            </a>
          </li>
          <li class="m-nav__separator">
            -
          </li>
          <li class="m-nav__item">
            <a href="<?php echo $this->session->userdata("dashboard_link")?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Home
              </span>
            </a>
          </li>
          <li class="m-nav__separator">
            -
          </li>
          <li class="m-nav__item">
            <a href="<?php echo base_url() ?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Add New Salary Slip
              </span>
            </a>
          </li>


        </ul>
      </div>
      <div>

      </div>
    </div>
  </div>
  <!-- END: Subheader -->
  <div class="m-content">
    <!--begin::Portlet-->
    <div class="row">

      <div class="col-lg-12">
        <div class="m-portlet">
          <div class="m-portlet__head">
            <div class="m-portlet__head-caption">
              <div class="m-portlet__head-title">
                <h3 class="m-portlet__head-text">
                  Add New Salary Slip
                </h3>
              </div>
            </div>
          </div>
          <!--begin::Form-->
          <form autocomplete="off"  data-form-type="project_add" id="form_salary_slip_add" method="post" action="<?php echo base_url().'work/create'?>" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right ">
            <div class="m-portlet__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 class="row">
                  <div class="col-lg-4">
                    <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-3 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-1 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 salary_add_calculate_fields" placeholder="Month" >
                      </div>
                      <span class="m-form__help"></span>
                    </div>
                  </div>
                  <div class="col-lg-3">
                    <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>
                <div id="office_expense_div" style="display: none">
                  <?php if($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 readonly value="<?php echo date("t")?>" type="text" name="month_days" id="salary_slip_month_days_add"  class=" form_salary_slip_add_fields_2  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 }else{ ?>
                    <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 readonly value="<?php echo date("t")?>" type="text" name="month_days" id="salary_slip_month_days_add"  class=" form_salary_slip_add_fields_2  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 } ?>
                  <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_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">
                          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>
                </div>
                <div id="project_expense_div" style="display: none">
                  <div class="table-responsive">
                    <table class="table m-table table-bordered item_table">
                      <thead>
                        <tr>
                          <th width="7%">Sl No</th>
                          <th width="31%" style="text-align: left">Project</th>
                          <th width="10%">Worked Days</th>
                          <th width="10%">Overtime</th>
                          <th width="10%">Overtime Amt</th>
                          <th width="10%">Allowance</th>
                          <th width="10%">Deductions</th>
                          <th width="18%">Total Amount</th>
                          <th width="7%">&nbsp;</th>
                          <!-- <th>Item Type</th> -->
                        </tr>
                      </thead>
                      <tbody id="item_body">
                        <tr class="row_0">
                          <td>1</td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-select2 m-select2--air ">
                                <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>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon ">
                                <input  type="text" required name="item_qty[0]" class="form-control item_rate_fields" id="item_qty_1" data-sl-no="1" placeholder="Days" >
                              </div>
                            </div>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon ">
                                <input  type="text" required name="item_price[0]" id="item_price_1" class="form-control item_rate_fields" data-sl-no="1" placeholder="Duration">
                              </div>
                            </div>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon m-input-icon--right">
                                <input  type="text" required name="item_total[0]" readonly id="item_total_1" class="form-control item_amount_field" data-sl-no="1" placeholder="Overtime" >
                              </div>
                            </div>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon ">
                                <input  type="text" required name="item_price[0]" id="item_price_1" class="form-control item_rate_fields" data-sl-no="1" placeholder="Allowance">
                              </div>
                            </div>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon ">
                                <input  type="text" required name="item_price[0]" id="item_price_1" class="form-control item_rate_fields" data-sl-no="1" placeholder="Deduction">
                              </div>
                            </div>
                          </td>
                          <td style="text-align: left">
                            <div class="form-group m-form__group">
                              <div class="m-input-icon m-input-icon--right">
                                <input  type="text" required name="item_total[0]" readonly id="item_total_1" class="form-control item_amount_field" data-sl-no="1" placeholder="Total" >
                              </div>
                            </div>
                          </td>
                          <td>
                            <a href="javascript:" data-row-sl-no='0' class="ibtnDel btn btn-danger btn-icon-only" ><i class="fa fa-trash"></i>
                            </td>
                          </tr>
                        </tbody>
                      </table>
                      <table class="table m-table table-bordered item_table">
                        <thead>
                          <th>
                            <button type="button" style=" width: 100%; " id="btn_add_row" class="btn btn-brand"><i class="fa fa-plus-circle"></i> Add New Project</button>
                          </th>
                        </thead>
                      </table>
                      <table class="table m-table table-bordered item_table">
                        <thead>
                          <tr>
                            <th style=" width: 15%;" id="payable_amount_th">
                              Total Days Worked
                            </th>
                            <th style=" width: 15%;text-align: left" id="tax_amount_th">
                              Total Overtime
                            </th>
                            <th style=" width: 15%;text-align: left">
                              Total Overtime Amount
                            </th>
                            <th style=" width: 15%;text-align: left">
                              Total Allowance
                            </th>
                            <th style=" width: 15%;text-align: left">
                              Total Deduction
                            </th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                            <td>
                              <input required type="text" required readonly name="bill_taxable_amount" id="payable_amount" class="form-control" value="0" placeholder="" >
                            </td>
                            <td id="tax_amount_td">
                              <input required type="text" required readonly name="bill_tax_amount" id="tax_amount" class="form-control" value="0" placeholder="" >
                            </td>
                            <td>
                              <input required type="text" required readonlyname="bill_discount_amount" id="discount_amount" class="form-control item_rate_fields" value="0" placeholder="" >
                            </td>
                            <td>
                              <input required type="text" required readonly name="bill_total_amount" id="total_amount" class="form-control" value="0" placeholder="" >
                            </td>
                            <td>
                              <input required type="text" required readonly name="bill_total_amount" id="total_amount" class="form-control" value="0" placeholder="" >
                            </td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                  <div class="row" style="padding-left: 15px;padding-right: 15px;">
                    <div class="col-lg-2 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          Total 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-2 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-2 padding-0">
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          Total 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 class="col-lg-6 padding-0">
                      <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>
              </div>
              <div class="m-portlet__foot m-portlet__foot--fit">
                <div class="m-form__actions m-form__actions">
                  <div class="row">
                    <div class="col-lg-9 ml-lg-auto">
                      <button type="submit" class="btn btn-brand form_submit_btn">
                        Submit
                      </button>
                      <button type="reset" class="btn btn-secondary">
                        Cancel
                      </button>
                    </div>
                  </div>
                </div>
              </div>
            </form>
            <!--end::Form-->

          </div>
        </div>

      </div>
    </div>
  </div>
</div>
<!-- end:: Body -->
<!-- begin::Footer -->

<?php $this->view("includes/Inc_footer");?>
<!-- end::Footer -->
</div>
<!-- end:: Page -->

<?php $this->view("includes/Inc_sidebar");?>
<?php $this->view("includes/Inc_scripts");?>

<!--begin::Page Snippets -->
<?php $this->view("modules/include_scripts/bill_scripts");?>
<?php $this->view("modules/include_scripts/transaction_scripts");?>
<script>

//    Toggle Sidebar
$("#m_aside_left_minimize_toggle").addClass("m-brand__toggler--active");
$("#body").addClass("m-brand--minimize m-aside-left--minimize");
$("#hr_menu").addClass('m-menu__item--active m-menu__item--open');
$("#hr_menu_2").addClass('m-menu__item--active');

</script>
<?php $this->view("modules/include_scripts/salary_slips_scripts");?>
<script>
$('input[type=radio][name=salary_slip_type]').change(function() {
  if (this.value == 'Project') {
    $("#project_expense_div").show();
    $("#office_expense_div").hide();
  }else{
    $("#project_expense_div").hide();
    $("#office_expense_div").show();
  }
});
</script>
