<div class="modal fade" tabindex="-1" id="supplier_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" >
          Create New Supplier
        </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="supplier_create" id="form_supplier_add" data-modal-id="supplier_add_modal" method="post" action="<?php echo base_url().'supplier/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_supplier_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">
            <?php if($this->config->item('app_module_vehicle_management')==1){ ?>
              <div class="col-lg-6">
                <div class="form-group m-form__group">
                  <label>
                    Supplier Type
                  </label>
                  <div class="m-radio-inline" style="padding-top: 10px;">
                    <label class="m-radio m-radio--solid m-radio--state-danger">
                      <input required type="radio" class="form_fields_radio" checked name="supplier_type" value="construction"> Construction Materials
                      <span></span>
                    </label>
                    <label class="m-radio m-radio--solid m-radio--state-warning">
                      <input type="radio" class="form_fields_radio" name="supplier_type"  value="vehicle">
                      Vehicle Spares / Fuel Pump / Workshop
                      <span></span>
                    </label>
                  </div>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>
            <div class="col-lg-6">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Category
                </label>
                <div class="input-group m-input-group m-input-group--pill">
                  <div class="input-group-prepend">
                    <a href="#supplier_category_add_modal"   data-toggle="modal" data-target="#supplier_category_add_modal" class="btn btn-focus">
                      <i class="fa fa-plus-circle"></i>
                    </a>
                  </div>
                  <select multiple style="width: 84%"  class="form-control m-select2 m-select2-general form_supplier_add_select"  id="supplier_category_add" name="category[]">

                  </select>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-8">
              <div class="form-group m-form__group">
                <label for="user_name">
                  Supplier Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input required type="text" name="name"  class="form-control form_supplier_add_fields m-input" placeholder="Supplier Name" aria-describedby="basic-addon1">
                </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">
                  Contact Person
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="contact_person"  class="form-control form_supplier_add_fields m-input" 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">
                  Supplier Address
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <textarea required rows="2" name="address"  class="form_supplier_add_fields form-control m-input" placeholder="Supplier Address" aria-describedby="basic-addon1"></textarea>
                </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">
                  Contact No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="phone"  class="form_supplier_add_fields form-control m-input" placeholder="Supplier Phone" 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">
                  Email
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="email"  class="form_supplier_add_fields form-control m-input" placeholder="Supplier Email" aria-describedby="basic-addon1">
                </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">
                  <?php echo $this->config->item('Tax_tax_name') ?> No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="tax_no"  class="form_supplier_add_fields form-control m-input" placeholder="<?php echo $this->config->item('Tax_tax_name') ?> No" aria-describedby="basic-addon1">
                </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">
                  <?php echo $this->config->item('Tax_tax_name') ?> Date
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text"  data-date-format="dd-mm-yyyy" name="tax_date" id="tax_date_add"  class="form_supplier_add_fields form-control m-input" placeholder="<?php echo $this->config->item('Tax_tax_name') ?> Date" aria-describedby="basic-addon1">
                </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">
                  Opening Balance (Payable on A/C Creation)
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input required type="text" name="op_balance"  class="form_supplier_add_fields form-control m-input" placeholder="Supplier Opening Balance" aria-describedby="basic-addon1">
                </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">
                  PAN No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="pan_no"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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">
                  Aadhar No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="aadhar_no"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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">
                  Bank A/C No
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="bank_account_no"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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">
                  IFSC Code
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="bank_ifsc"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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">
                  Bank Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="bank_name"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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">
                  Branch Name
                </label>
                <div class="input-group m-input-group m-input-group--pill m-input-group--air">
                  <input type="text" name="bank_branch"  class="form_supplier_add_fields form-control m-input" aria-describedby="basic-addon1">
                </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 class="modal fade" tabindex="-1" id="supplier_category_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" >
          Create New Category
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form  autocomplete="off" id="form_supplier_category_add" data-form-type="supplier_category" data-modal-id="supplier_category_add_modal" method="post" action="<?php echo base_url().'supplier/create_category'?>" 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_supplier_category_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">
                  Category Name
                </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-tag"></i>
                    </span>
                  </div>
                  <input required type="text" name="name"  class="form-control m-input form_supplier_category_add_fields" placeholder="Category Name" aria-describedby="basic-addon1">
                </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>
