<table width="100%" class="table m-table nowrap table-header-fixed table-striped table-bordered table-hover table-header-fixed" id="labour_wage_view_table">
  <thead>
    <tr class="">
      <th>Sl No</th>
      <th>Slip Id</th>
      <th>Labour Name</th>
      <th>Work Type</th>
      <th>Work Date</th>
      <th>Day</th>
      <th>Attendance</th>
      <th>Work</th>
      <th><?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?>s Count</th>
      <th>No of Labours Worked</th>
      <th>Basic Wage/<?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?></th>
      <th>Overtime Rate/<?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?></th>
      <th>Overtime Duration</th>
      <th>Overtime Wage</th>
      <th>Extra Wage</th>
      <th>TA Wage</th>
      <th>Food Alwnc</th>
      <th>Total Wage</th>
      <th>Remarks</th>
      <th>Created By</th>
      <th>Created On</th>
      <th>Actions</th>
      <th>Labour ID</th>
      <th>Work ID</th>
      <th>Overtime Rate</th>
      <th>Approval Status</th>
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>

<div class="modal fade" tabindex="-1" id="labour_wage_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 Daily Wage 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="labour_wage" id="form_labour_wage_add" data-modal-id="labour_wage_add_modal" method="post" action="<?php echo base_url().'labour_wages/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_labour_wage_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="form-group m-form__group" >
                <label for="user_name">
                  Labour
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select required style="width: 100%" class="form-control m-select2  form_labour_wage_add_select" id="labour_wage_labour_add" name="labour"  >
                    <option selected disabled>Select Labour</option>
                    <?php
                    foreach($labours as $row):
                      if($row->labour_type==0){
                        $labour_type = "Individual";
                      }else{
                        if($row->group_position==1){
                          $labour_type = "Group Head";
                        }else{
                          $labour_type = "Group Member";
                        }
                      }
                      ?>
                      <option value="<?php echo $row->labour_id?>"><?php echo $row->labour_name." [".$row->type_name."] - (".$labour_type.")"?></option>
                      <?php
                    endforeach;
                    ?>
                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-3">
              <?php
              if($this->config->item('Labour_wage_slip_no_of_labours_field_show')==1){
                $no_of_labours_field_show="";
              }else{
                $no_of_labours_field_show="display: none";
              }
              ?>
              <div class="form-group m-form__group" id="labour_wage_no_of_labours_div_add" style="<?php echo $no_of_labours_field_show?>">
                <label for="user_name">
                  No. of Labours Worked
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input value="1" required type="text" name="no_of_labours" id="no_of_labours_add" value="1" class="wage_add_calculate_fields form_labour_wage_add_fields_2  form-control m-input" placeholder="No. of Days" 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">
                  Work Date
                </label>
                <div class="input-group m-input-group--air m-input-group--pill  date">
                  <input value="<?php echo date('d-m-Y')?>"  data-date-format="dd-mm-yyyy" id="labour_wage_work_date_add" required type="text" name="work_date" class="form-control  m-input " placeholder="Work Date" >
                </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">
                  Work
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select required style="width: 100%" class="form-control m-select2 <?php if($page_name!='work_profile'){?> form_labour_wage_add_select <?php } ?> " id="labour_wage_work_add" name="work"  >
                    <option selected disabled>Select Work</option>
                    <?php
                    foreach($work_contracts 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>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-3">
          <?php }else{ ?>
            <div class="col-lg-2" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                No. of <?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?>s
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">

                <input value="1" required type="text" name="no_of_days" id="no_of_days_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_2  form-control m-input" placeholder="No. of Days" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-5">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Basic Wage/<?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?>
              </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="wage_per_day" id="wage_per_day_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Basic Daily Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
            <?php if($this->config->item('Labour_wage_overtime_calculation')=='hour'){ ?>
              <div class="col-lg-3" style="padding-left: 0px;">
                <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">
                    <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="overtime_rate" id="overtime_rate_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Overtime Wage" aria-describedby="basic-addon1">
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>
        </div>
        <div class="row">
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='hour'){ ?>
            <div class="col-lg-3">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Overtime Duration
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input value="0" required type="text" name="overtime_duration" id="overtime_duration_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Overtime Hour" aria-describedby="basic-addon1">
                  <div class="input-group-append">
                    <span class="input-group-text" id="basic-addon1">
                      Hour
                    </span>
                  </div>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          <?php } ?>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Overtime Wage
              </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="overtime_wage" id="overtime_wage_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Overtime Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Extra Wage
              </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="extra_wage" id="extra_wage_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Extra Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
          <div class="form-group m-form__group" >
            <label for="user_name">
              TA Wage
            </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="ta_wage" id="ta_wage_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="TA Wage" aria-describedby="basic-addon1">
            </div>
            <span class="m-form__help"></span>
          </div>
          </div>
          <input type="hidden" name="ta_amount_day" id="ta_amount_day_add">
        </div>
        <div class="row">
          <div class="col-lg-3">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Food 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="food_allowance" id="food_allowance_add"  class="wage_add_calculate_fields form_labour_wage_add_fields_1 form-control m-input" placeholder="Food Allowance" 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">
                Total Wage
              </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="total_wage_add"  class="form_labour_wage_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">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Previous Balance
              </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="previous_balance" id="previous_balance_add"  class="form_labour_wage_add_fields_1 form-control m-input" placeholder="Previous Balance" 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">
                Total Balance
              </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_balance" id="total_balance_add_wage_slip"  class="form_labour_wage_add_fields_1 form-control m-input" placeholder="Total Balance" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <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">
                <input  type="text" name="remarks"  class="form-control m-input form_labour_wage_add_fields" placeholder="Wage 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 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="labour_wage_paid_amount_add" value="" class="form-control m-input m-input--pill m-input--air form_labour_wage_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="labour_wage_paid_date_add"  type="text" name="paid_date" class="form_labour_wage_add_fields form-control m-input m-input--pill m-input--air labour_wage_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="labour_wage_debit_acc_add" name="debit_acc" style="width: 100%" class="form-control m-input form_labour_wage_add_select labour_wage_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="labour_wage_payment_mode_add" name="payment_mode" style="width: 100%" class="form-control m-input form_labour_wage_add_select labour_wage_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_labour_wage_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="labour_wage_reference_date_add"  class="form-control m-input m-input--pill m-input--air form_labour_wage_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-12" >
                <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_labour_wage_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>
          </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="labour_wage_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: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Edit Daily Wage 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="labour_wage" data-modal-id="labour_wage_edit_modal" id="form_labour_wage_edit" method="post" action="<?php echo base_url().'labour_wages/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_labour_wage_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="form-group m-form__group" >
                <label for="user_name">
                  Labour
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select disabled style="width: 100%" class="form-control m-select2  form_labour_wage_edit_select" id="labour_wage_labour_edit" name="labour"  >
                    <option selected disabled>Select Labour</option>
                    <?php
                    foreach($labours as $row):   if($row->labour_type==0){
                      $labour_type = "Individual";
                    }else{
                      if($row->group_position==1){
                        $labour_type = "Group Head";
                      }else{
                        $labour_type = "Group Member";
                      }
                    }
                    ?>
                    <option value="<?php echo $row->labour_id?>"><?php echo $row->labour_name." [".$row->type_name."] - (".$labour_type.")"?></option>
                    <?php
                  endforeach;
                  ?>
                </select>
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3">
            <div class="form-group m-form__group" id="labour_wage_no_of_labours_div_edit" >
              <label for="user_name">
                No. of Labours Worked
              </label>
              <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                <input value="1" required type="text" name="no_of_labours" id="no_of_labours_edit"  class="wage_edit_calculate_fields form_labour_wage_add_fields_2  form-control m-input" placeholder="No. of Days" 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">
                Work Date
              </label>
              <div class="input-group m-input-group--air m-input-group--pill  date">
                <input value="<?php echo date('d-m-Y')?>"  data-date-format="dd-mm-yyyy" id="labour_wage_work_date_edit" required type="text" name="work_date" class="form-control  m-input " placeholder="Work Date" >
              </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">
                Work
              </label>
              <div class="m-select2 m-select2--air m-select2--pill">
                <select required style="width: 100%" class="form-control m-select2  form_labour_wage_edit_select" id="labour_wage_work_edit" name="work"  >
                  <option selected disabled>Select Work</option>
                  <?php
                  foreach($work_contracts 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 class="col-lg-3">
            <div class="form-group m-form__group" >
              <label for="user_name">
                No. of <?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?>s
              </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-calendar"></i>
                  </span>
                </div>
                <input value="1" required type="text" name="no_of_days" id="no_of_days_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_2  form-control m-input" placeholder="No. of Days" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-5">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Basic Wage / <?php echo ucwords($this->config->item('Labour_wage_calculation_type')) ?>
              </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="wage_per_day" id="wage_per_day_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Basic Daily Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='hour'){ ?>
            <div class="col-lg-2" style="padding-left: 0px;">
              <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">
                  <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="overtime_rate" id="overtime_rate_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Overtime Wage" aria-describedby="basic-addon1">
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          <?php } ?>
        </div>
        <div class="row">
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='hour'){ ?>
            <div class="col-lg-3">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Overtime Duration
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input value="0" required type="text" name="overtime_duration" id="overtime_duration_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Overtime Hour" aria-describedby="basic-addon1">
                  <div class="input-group-append">
                    <span class="input-group-text" id="basic-addon1">
                      Hour
                    </span>
                  </div>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          <?php } ?>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Overtime Wage
              </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="overtime_wage" id="overtime_wage_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Overtime Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Extra Wage
              </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="extra_wage" id="extra_wage_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Extra Wage" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <?php if($this->config->item('Labour_wage_overtime_calculation')=='amount'){ ?>
          <div class="col-lg-4">
          <?php }else{ ?>
            <div class="col-lg-3" >
          <?php } ?>
          <div class="form-group m-form__group" >
            <label for="user_name">
              TA Wage
            </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="ta_wage" id="ta_wage_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="TA 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">
                Food 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="food_allowance" id="food_allowance_edit"  class="wage_edit_calculate_fields form_labour_wage_edit_fields_1 form-control m-input" placeholder="Food Allowance" aria-describedby="basic-addon1">
              </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">
                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="remarks_edit"  class="form-control m-input form_labour_wage_edit_fields" placeholder="Remarks" 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">
                Total Wage
              </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="total_wage_edit"  class="form_labour_wage_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" style="display: none">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Previous Balance
              </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="previous_balance" id="previous_balance_edit"  class="form_labour_wage_edit_fields_1 form-control m-input" placeholder="Previous Balance" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
          <div class="col-lg-3" style="display: none">
            <div class="form-group m-form__group" >
              <label for="user_name">
                Total Balance
              </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_balance" id="total_balance_edit"  class="form_labour_wage_edit_fields_1 form-control m-input" placeholder="Total Balance" aria-describedby="basic-addon1">
              </div>
              <span class="m-form__help"></span>
            </div>
          </div>
        </div>
        <div class="row">
          <input type="hidden" name="wage_id" id="labour_wage_id_edit">
          <input type="hidden" name="labour" id="labour_id_edit">
        </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">
          Update
        </button>
      </div>
    </form>
  </div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="labour_wage_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form id="form_labour_wage_delete" data-form-type="labour_wage" data-modal-id="labour_wage_delete_modal" autocomplete="off" method="post" action="<?php echo base_url().'labour_wages/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="wage_id" id="labour_wage_id_delete">
        </div>
      </div>
    </form>
  </div>
</div>
