<?php $this->view("includes/Inc_pagehead");?>
<!-- Page Styles Goes Here-->

<?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">
          Enquiry Profile
        </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().'enquiries/profile/'.$enquiry_data->enquiry_id ?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Enquiry Profile
              </span>
            </a>
          </li>


        </ul>
      </div>
      <div>

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

    <div class="row">
      <div class="col-xl-3 col-lg-4">
        <div class="m-portlet m-portlet--full-height  ">

          <div class="m-portlet__body" style="padding-top: 0px">
            <div class="m-card-profile">
              <div class="m-card-profile__title m--hide">
                Enquiry Profile
              </div>
              <div class="m-card-profile__pic">
                <div class="m-card-profile__pic-wrapper">
                  <img src="<?php echo $this->config->item('Template_template_file_url'); ?>template/assets/app/media/img/misc/file.png" alt=""/>
                </div>
              </div>
              <div class="m-card-profile__details">
                <span class="m-card-profile__name">
                  #<?php echo $enquiry_data->enquiry_id?><br/>
                  <?php echo $enquiry_data->service_name?>
                </span>
                <?php if ($this->config->item('app_module_company_branches') == 1){?>
                  Branch : <?php echo $enquiry_data->branch_name?>
                <?php } ?>
                <?php echo $enquiry_data->customer_name?>
                <br/>
                <span class='m-badge m-badge--success m-badge--wide'>
                  <i class='fa fa-check-circle'></i> <?php echo $enquiry_data->enquiry_status?>
                </span>
                <br/><br/>
                <?php
                if($enquiry_data->currently_assigned_to!=''){ ?>
                  <span class='m-badge m-badge--focus m-badge--wide' style="font-size:18px;font-weight:600;padding:10px">
                    Assigned To : <?php echo $enquiry_data->assigned_user ?>
                  </span>
                <?php } ?>
                <br/>
                <a data-id="<?php echo $enquiry_data->enquiry_id?>" id="enquiry_edit_btn" href="#enquiry_edit_modal" data-toggle="modal" class="btn btn-warning m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-edit"></i>
                    <span>
                      Edit Enquiry
                    </span>
                  </span>
                </a>
                <?php
                if($enquiry_data->quotation_required==1){ ?>
                <a style="margin-top:10px" href="<?php echo base_url()?>sales_quotation/add?enquiry_id=<?php echo $enquiry_data->enquiry_id ?>" class="btn btn-success m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-plus"></i>
                    <span>
                      Create New Quotation
                    </span>
                  </span>
                </a>
              <?php }else{ ?>
                <a style="margin-top:10px" href="<?php echo base_url()?>work/add?enquiry_id=<?php echo $enquiry_data->enquiry_id ?>" class="btn btn-focus m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-plus"></i>
                    <span>
                      Create New Project
                    </span>
                  </span>
                </a>
              <?php } ?>
              </div>

              <div class="m-card-profile__details">
                <span class="m-card-profile__name">

                </span>
              </div>
              <br/>
            </div>
            <ul class="m-nav m-nav--hover-bg m-portlet-fit--sides">
              <li class="m-nav__separator m-nav__separator--fit" style="margin-top: 0px"></li>
              <li class="m-nav__section m--hide">
                <span class="m-nav__section-text">
                  Section
                </span>
              </li>
              <li class="m-nav__item profile_nav" id="nav_info" data-nav="info" data-table-name=''>
                <a href="javascript:;" class="m-nav__link">
                  <i class="m-nav__link-icon fa fa-info-circle"></i>
                  <span class="m-nav__link-title">
                    <span class="m-nav__link-wrap">
                      <span class="m-nav__link-text">
                        Enquiry Info
                      </span>
                    </span>
                  </span>
                </a>
              </li>
              <li class="m-nav__item profile_nav" id="nav_responses" data-nav="responses" data-table-name='enquiry_response_view_table'>
                <a href="javascript:;" class="m-nav__link">
                  <i class="m-nav__link-icon fa fa-comments"></i>
                  <span class="m-nav__link-title">
                    <span class="m-nav__link-wrap">
                      <span class="m-nav__link-text">
                        Responses
                      </span>
                    </span>
                  </span>
                </a>
              </li>
              <li class="m-nav__item profile_nav" id="nav_followups" data-nav="followups" data-table-name='enquiry_followups_view_table'>
                <a href="javascript:;" class="m-nav__link">
                  <i class="m-nav__link-icon fa fa-bell"></i>
                  <span class="m-nav__link-title">
                    <span class="m-nav__link-wrap">
                      <span class="m-nav__link-text">
                        Followups
                      </span>
                    </span>
                  </span>
                </a>
              </li>
              <li class="m-nav__item profile_nav" id="nav_assign_logs" data-nav="assign_logs" data-table-name='enquiry_assign_logs_view_table'>
                <a href="javascript:;" class="m-nav__link">
                  <i class="m-nav__link-icon fa fa-file-alt"></i>
                  <span class="m-nav__link-title">
                    <span class="m-nav__link-wrap">
                      <span class="m-nav__link-text">
                        Assign Logs
                      </span>
                    </span>
                  </span>
                </a>
              </li>
              <?php if ($this->config->item('app_module_company_branches') == 1){?>
                <li class="m-nav__item profile_nav" id="nav_transfer" data-nav="transfer" data-table-name='enquiry_transfer_view_table'>
                  <a href="javascript:;" class="m-nav__link">
                    <i class="m-nav__link-icon la la-exchange"></i>
                    <span class="m-nav__link-title">
                      <span class="m-nav__link-wrap">
                        <span class="m-nav__link-text">
                          Branch Transfer Log
                        </span>
                      </span>
                    </span>
                  </a>
                </li>
              <?php } ?>
            </ul>
          </div>
        </div>
      </div>
      <div class="col-xl-9 col-lg-8">
        <div id="div_info" class="profile_nav_div">
          <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">
                    Enquiry Info
                  </h3>
                </div>
              </div>
            </div>
            <div class="m-portlet__body">
              <form autocomplete="off" class="m-form m-form--fit m-form--label-align-right">
                <div class="m-portlet__body">
                  <div class="row">
                    <div class="col-lg-6">
                      <div class="form-group m-form__group row">
                        <div class="col-9 ml-auto">
                          <h4 class="m-form__section">
                            Enquiry Details
                          </h4>
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Enquiry ID
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enquiry_id?>">
                        </div>
                      </div>
                      <?php if ($this->config->item('app_module_company_branches') == 1){?>
                        <div class="form-group m-form__group">
                          <label >
                            Branch
                          </label>
                          <div class="input-group m-input-group--air">
                            <div class="input-group-prepend">
                              <span class="input-group-text">
                                <i class="fa fa-hashtag"></i>
                              </span>
                            </div>
                            <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->branch_name?>">
                          </div>
                        </div>
                      <?php } ?>
                      <div class="form-group m-form__group">
                        <label>
                          Enquiry Date
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-calendar-alt"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo date('d-m-Y', strtotime($enquiry_data->enquiry_date))?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Service
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-toolbox"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->service_name?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Service Type
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-toolbox"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->service_type_name?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Reference No
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-edit"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enquiry_reference_no?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Work Place
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-toolbox"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->work_place?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Enquiry Mode
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-toolbox"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enquiry_mode?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Nature of Enquiry
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-toolbox"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->nature_of_enquiry?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Priority
                        </label>
                        <br/>
                        <?php
                        if($enquiry_data->enquiry_priority==1){
                          $enquiry_priority="<span class='m-badge m-badge--danger m-badge--wide'> High</span>";
                        }elseif($enquiry_data->enquiry_priority==2){
                          $enquiry_priority="<span class='m-badge m-badge--warning m-badge--wide'> Med</span>";
                        }else{
                          $enquiry_priority="<span class='m-badge m-badge--info m-badge--wide'> Low</span>";
                        }

                        echo $enquiry_priority; ?>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Service Details
                        </label>
                        <textarea disabled class="form-control m-input m-input--solid"><?php echo $enquiry_data->service_details?></textarea>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Observations
                        </label>
                        <textarea disabled class="form-control m-input m-input--solid"><?php echo $enquiry_data->observations?></textarea>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Actions Taken
                        </label>
                        <textarea disabled class="form-control m-input m-input--solid"><?php echo $enquiry_data->actions_taken?></textarea>
                      </div>
                      <div class="form-group m-form__group">
                        <label>
                          Remarks
                        </label>
                        <textarea disabled class="form-control m-input m-input--solid"><?php echo $enquiry_data->remarks?></textarea>
                      </div>
                    </div>
                    <div class="col-lg-6">
                      <div class="form-group m-form__group row">
                        <div class="col-9 ml-auto">
                          <h4 class="m-form__section">
                            Customer Details
                          </h4>
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Customer ID
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->customer_id?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Customer/Company Name
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->customer_name?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Requested Person
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enq_requested_person?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Requested Person Phone
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enq_requested_person_mobile?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Contact Person
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enq_contact_person?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Contact Person Phone
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->enq_contact_person_mobile?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Location
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->customer_location?>">
                        </div>
                      </div>
                      <div class="form-group m-form__group">
                        <label >
                          Email
                        </label>
                        <div class="input-group m-input-group--air">
                          <div class="input-group-prepend">
                            <span class="input-group-text">
                              <i class="fa fa-hashtag"></i>
                            </span>
                          </div>
                          <input disabled type="text" class="form-control m-input m-input--solid" value="<?php echo $enquiry_data->customer_email?>">
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>

        <div id="div_responses" class="profile_nav_div">
          <div class="m-portlet m-portlet--mobile m-portlet--info m-portlet--head-solid-bg m-portlet--bordered m-portlet--rounded">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <h3 class="m-portlet__head-text">
                    List of Responses
                  </h3>
                </div>
              </div>
              <div class="m-portlet__head-tools">
                <a href="#" data-toggle="modal" data-target="#enquiry_response_add_modal" class="btn btn-focus m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-plus"></i>
                    <span>
                      Create New Response
                    </span>
                  </span>
                </a>
              </div>
            </div>
            <div class="m-portlet__body">
              <!--begin: Datatable -->
              <?php $this->view("modules/include_tables/table_enquiry_responses");?>
              <!--end: Datatable -->

              <!--end: Datatable -->
              <?php $this->view("modules/include_modals/modal_enquiry_responses");?>
            </div>
          </div>
        </div>
        <div id="div_followups" class="profile_nav_div">
          <div class="m-portlet m-portlet--mobile m-portlet--info m-portlet--head-solid-bg m-portlet--bordered m-portlet--rounded">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <h3 class="m-portlet__head-text">
                    List of Followups
                  </h3>
                </div>
              </div>
              <div class="m-portlet__head-tools">
                <a href="#" data-toggle="modal" data-target="#enquiry_followup_add_modal" class="btn btn-focus m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-plus"></i>
                    <span>
                      Create New Followup
                    </span>
                  </span>
                </a>
              </div>
            </div>
            <div class="m-portlet__body">
              <!--begin: Datatable -->
              <?php $this->view("modules/include_tables/table_enquiry_followups");?>
              <!--end: Datatable -->

              <!--end: Datatable -->
              <?php $this->view("modules/include_modals/modal_enquiry_followups");?>
            </div>
          </div>
        </div>
        <div id="div_assign_logs" class="profile_nav_div">
          <div class="m-portlet m-portlet--mobile m-portlet--info m-portlet--head-solid-bg m-portlet--bordered m-portlet--rounded">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <h3 class="m-portlet__head-text">
                    Enquiry Assign Log
                  </h3>
                </div>
              </div>
              <div class="m-portlet__head-tools">

              </div>
            </div>
            <div class="m-portlet__body">
              <!--begin: Datatable -->
              <table width="100%" class="table m-table nowrap table-header-fixed table-striped table-bordered table-hover table-header-fixed" id="enquiry_assign_logs_view_table">
                <thead>
                  <tr class="">
                    <th>Sl No</th>
                    <th>Assigned To</th>
                    <th>Remarks</th>
                    <th>Assignation Details</th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>

            </div>
          </div>
        </div>
        <div id="div_transfer" class="profile_nav_div">
          <div class="m-portlet m-portlet--mobile m-portlet--info m-portlet--head-solid-bg m-portlet--bordered m-portlet--rounded">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <h3 class="m-portlet__head-text">
                    Enquiry Branch Transfer Log
                  </h3>
                </div>
              </div>
              <div class="m-portlet__head-tools">
                <a href="#" data-toggle="modal" data-target="#enquiry_transfer_add_modal" class="btn btn-focus m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill">
                  <span>
                    <i class="la la-exchange"></i>
                    <span>
                      Transfer To Branch
                    </span>
                  </span>
                </a>
              </div>
            </div>
            <div class="m-portlet__body">
              <!--begin: Datatable -->
              <table width="100%" class="table m-table nowrap table-header-fixed table-striped table-bordered table-hover table-header-fixed" id="enquiry_transfer_view_table">
                <thead>
                  <tr class="">
                    <th>Sl No</th>
                    <th>ID</th>
                    <th>Transferred From</th>
                    <th>Transferred To</th>
                    <th>Remarks</th>
                    <th>Transferred Details</th>
                  </tr>
                </thead>
                <tbody>
                </tbody>
              </table>
              <div class="modal fade" tabindex="-1" id="enquiry_transfer_add_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" >
                        Transfer Enquiry
                      </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="enquiry" data-modal-id="enquiry_transfer_add_modal" id="form_enquiry_transfer_add" method="post" action="<?php echo base_url().'enquiries/create_transfer'?>" enctype="multipart/form-data" class="form 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_enquiry_transfer_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-12">
                            <div class="form-group m-form__group" >
                              <label for="user_name">
                                Enquiry
                              </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="fa fa-edit"></i>
                                  </span>
                                </div>
                                <input disabled type="text" value="<?php echo '#'.$enquiry_data->enquiry_id.' - '.$enquiry_data->customer_name.' ('.$enquiry_data->service_name.')'?>" class="form-control m-input form_enquiry_transfer_add_fields" placeholder="Enquiry" aria-describedby="basic-addon1">
                                <input type="hidden" name="enquiry_id" value="<?php echo $enquiry_data->enquiry_id?>" >
                              </div>
                              <span class="m-form__help"></span>
                            </div>
                          </div>
                          <div class="col-lg-12">
                            <div class="form-group m-form__group" style="padding-right: 0px">
                              <label for="user_name">
                                Current Branch
                              </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-sitemap"></i>
                                  </span>
                                </div>
                                <input disabled type="text" value="<?php echo $enquiry_data->branch_name?>"  class="form-control m-input form_enquiry_transfer_add_fields" 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">
                                Transfer To
                              </label>
                              <div class="m-select2 m-select2--air m-select2--pill ">
                                <select required style="width: 100%" class="form-control m-select2" id="transfer_to_branch_add" name="transfer_to_branch_id">
                                  <option selected disabled>Select Branch</option>
                                  <?php foreach ($branches as $key => $value) { ?>
                                    <option value="<?php echo $value->branch_id ?>"><?php echo $value->branch_name ?></option>
                                  <?php } ?>
                                </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">
                                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>
                                <textarea required type="text" name="remarks" class="form-control m-input form_enquiry_transfer_add_fields" placeholder="Remarks" aria-describedby="basic-addon1"></textarea>
                              </div>
                              <span class="m-form__help"></span>
                            </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>
          </div>
        </div>
      </div>

    </div>
    <?php $this->view("modules/include_modals/modal_enquiries");?>

  </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 -->
<script>
$("#table_filter_status").selectpicker();
$("[data-switch=true]").bootstrapSwitch()
</script>

<script>
$("#enquiries_menu").addClass('m-menu__item--active');
function hide_all(){
  $(".profile_nav").removeClass('m-nav__item--active');
  $(".profile_nav_div").hide();
}
function active(menu_name){
  hide_all();
  $("#nav_"+menu_name).addClass('m-nav__item--active');
  $("#div_"+menu_name).show();
  $("#div_"+menu_name).fadeIn("slow");
  $('html, body').animate({
    scrollTop: eval($("#div_"+menu_name).offset().top - 150)
  }, 500);
}
//  Hide All Div and In Active All Menu
hide_all();
//  Active First Menu and Its div
active('info');
$('body').on('click', '.profile_nav', function() {
  var nav = $(this).attr('data-nav');
  active(nav);
})
</script>


<script>

jQuery(document).ready(function() {
  $('.profile_nav').on('click', function(e){
    var table_name = $(this).attr('data-table-name');
    if(table_name!=''){
      var tables = table_name.split(',');
      $.each(tables, function( index, value ){
        var table_name = value;
        $('#'+table_name).dataTable().fnDestroy();
        eval("Datatable_"+table_name).init("reload");
        // eval(table_name).ajax.reload();
      });
    }
  });
})
</script>

<?php $this->view("modules/include_scripts/customers_scripts");?>
<?php $this->view("modules/include_scripts/enquiry_scripts");?>
