<table width="100%" class="table m-table nowrap table-header-fixed table-striped table-bordered table-hover table-header-fixed" id="acc_transfer_view_table">
  <thead>
    <tr class="">
      <th>Sl No</th>
      <th>Transaction ID</th>
      <th>Transferred From</th>
      <th>Transferred To</th>
      <th>Transferred Amount</th>
      <th>Transferred Date</th>
      <th>Payment Mode</th>
      <th>Remarks</th>
      <th>Created By</th>
      <th>Created On</th>
      <th>Actions</th>
      <th>From ID</th>
      <th>To ID</th>
      <th>Approval</th>

    </tr>
  </thead>
  <tbody>
  </tbody>
</table>

<div class="modal fade" tabindex="-1" id="acc_transfer_edit_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #36a3f7;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Update Account Transfer
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form id="form_account_transfer_edit" data-modal-id="acc_transfer_edit_modal" method="post" action="<?php echo base_url().'accounts/update_transaction_transfer'?>" 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_account_transfer_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 transaction_details_div"  >
                <label for="user_name">
                  Transfer From
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select required id="acc_from_edit"  name="acc_from"  style="width: 100%" class="form-control m-input transaction_required_fields"  aria-describedby="basic-addon1" data-placeholder="Select Debit Acc">
                    <option selected disabled>Select Account</option>
                    <?php
                    foreach($this->config->item('account_heads') as $row):
                      ?>
                      <option 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 class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Transfer To
                </label>
                <div class="m-select2 m-select2--air m-select2--pill ">
                  <select required style="width: 100%" class="form-control m-select2" id="acc_to_edit"  name="acc_to" data-placeholder="Select Account To">
                    <option selected disabled>Select Account To</option>

                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <input type="hidden" id="to_id" value="">
            <div class="col-lg-4">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Transfer 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="" required type="text" id="paid_amount_edit" name="paid_amount"  class="form-control bill_inputs  m-input" placeholder="Transfer Amount" aria-describedby="basic-addon1">
                </div>
                <input type="hidden" name="payment_part" value="1" />
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-4">
              <div class="form-group m-form__group transaction_details_div" >
                <label for="user_name">
                  Transfer Date
                </label>
                <div class="input-group m-input-group--pill m-input-group--air date">
                  <div class="input-group-prepend">
                    <span class="input-group-text">
                      <i class="la la-calendar"></i>
                    </span>
                  </div>
                  <input  data-date-format="dd-mm-yyyy" id="paid_date_edit" required  type="text" name="paid_date" class="form-control m-input transaction_required_fields  " placeholder="Transfer Date" >
                </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">
                  Payment Mode
                </label>
                <div class="m-select2 m-select2--air m-select2--pill">
                  <select id="payment_mode_edit" required name="payment_mode" style="width: 100%" class="form-control m-input transaction_required_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-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Transfer Remarks
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input type="text" name="tr_remarks" id="tr_remarks_edit" class="form-control m-input m-input--pill m-input--air" placeholder="Transfer 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>
            <input type="hidden" name="transaction_id" id="transaction_id_edit" value="">
          </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="acc_transfer_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-modal-id="acc_transfer_delete_modal" id="form_acc_transfer_delete" method="post" action="<?php echo base_url().'accounts/delete_transaction_transfer'?>" 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 transfer ?. all the data associated will be Deleted. </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="transaction_id" id="tr_id_delete">
          <input type="hidden" name="redirect_url" value="<?php echo base_url(uri_string())?>" >
        </div>
      </div>
    </form>
  </div>
</div>
