<div class="modal fade " id="add-item-modal">
    <?= form_open('#', array('class' => 'form', 'id' => 'items-form', 'enctype'=>'multipart/form-data', 'method'=>'POST'));?>
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header header-custom">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <label aria-hidden="true">&times;</label></button>
          <h4 class="modal-title text-center"><?= $this->lang->line('add_item'); ?></h4>
        </div>
        <div class="modal-body">
            <div class="row">
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                         <input type='hidden' name='store_id' id='store_id' value='<?= get_current_store_id();?>'>
                         <input type='hidden' name='item_group' id='item_group' value='Single'>
                         <input type='hidden' name='item_source' id='item_source' value='modal'>
                         <input type="hidden" id="base_url" value="<?php echo $base_url;; ?>">
                         
                        <label for="item_name"><?= $this->lang->line('item_name'); ?><span class="text-danger">*</span></label>
                        <input type="text" autofocus="" class="form-control" id="item_name" name="item_name" placeholder="">
                        <span id="item_name_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="brand_id"><?= $this->lang->line('brand'); ?></label>
                        <select class="form-control select2" id="brand_id" name="brand_id"  style="width: 100%;"  >
                           <option value="">-Select-</option>
                           <?= get_brands_select_list($brand_id);  ?>
                        </select>
                        <span id="brand_id_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="category_id"><?= $this->lang->line('category'); ?> <span class="text-danger">*</span></label>
                        <select class="form-control select2" id="category_id" name="category_id"  style="width: 100%;">
                           <option value="">-Select-</option>
                           <?= get_categories_select_list($category_id);  ?>
                        </select>
                        <span id="category_id_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="unit_id" class="control-label"><?= $this->lang->line('unit'); ?><span class="text-danger">*</span></label>
                        <select class="form-control select2" id="unit_id" name="unit_id"  style="width: 100%;" >
                        <?= get_units_select_list($unit_id);  ?>
                        </select>
                        <span id="unit_id_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>

                <input type="hidden" class="form-control" id="sku" name="sku" placeholder="">
                <input type="hidden" class="form-control" id="hsn" name="hsn" placeholder="">
                <input type="hidden" class="form-control only_currency" id="seller_points" name="seller_points" placeholder=""  >

              
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="alert_qty" ><?= $this->lang->line('alert_qty'); ?></label>
                        <input type="number" class="form-control no_special_char" id="alert_qty" name="alert_qty" placeholder="" min="0">
                        <span id="alert_qty_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
              
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="custom_barcode" ><?= $this->lang->line('barcode'); ?></label>
                        <input type="text" class="form-control " id="custom_barcode" name="custom_barcode" placeholder="" >
                        <span id="custom_barcode_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="description" ><?= $this->lang->line('description'); ?></label>
                        <input type="text" class="form-control" id="description" name="description" placeholder="" />
                        <span id="description_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <!--<div class="col-md-4">-->
               <!--   <div class="box-body">-->
               <!--      <div class="form-group">-->
               <!--         <label for="item_image"><?= $this->lang->line('select_image'); ?></label>-->
               <!--         <input type="file" name="item_image" id="item_image">-->
               <!--         <span id="item_image_msg" style="display:block;" class="text-danger">Max Width/Height: 1000px * 1000px & Size: 1MB </span>-->
               <!--      </div>-->
               <!--   </div>-->
               <!--</div>-->
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                          <label for="discount_type"><?= $this->lang->line('discount_type'); ?></label>
                          <select class="form-control" id="discount_type" name="discount_type">
                             <option value='Percentage'>Percentage(%)</option>
                             <option value='Fixed'>Fixed(<?= $CI->currency() ?>)</option>
                          </select>
                          <span id="discount_type_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
               <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="discount"><?= $this->lang->line('discount'); ?></label>
                        <input type="text" class="form-control only_currency" id="discount" name="discount" >
                        <span id="discount_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="price"><?= $this->lang->line('price'); ?><span class="text-danger">*</span></label>
                        <input type="text" class="form-control only_currency" id="price" name="price" placeholder="Price of Item without Tax" >
                        <span id="price_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="tax_id" ><?= $this->lang->line('tax'); ?><span class="text-danger">*</span></label>
                        <select class="form-control select2" id="tax_id" name="tax_id"  style="width: 100%;" >
                        <?= get_tax_select_list($tax_id);  ?>
                        </select>
                        <span id="tax_id_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="purchase_price"><?= $this->lang->line('purchase_price'); ?><span class="text-danger">*</span></label>
                        <input type="text" class="form-control only_currency" id="purchase_price" name="purchase_price" placeholder="Total Price with Tax Amount" readonly='' >
                        <span id="purchase_price_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="tax_type"><?= $this->lang->line('tax_type'); ?><span class="text-danger">*</span></label>
                        <select class="form-control select2" id="tax_type" name="tax_type"  style="width: 100%;" >
                            <option value="Inclusive">Inclusive</option>
                            <option value="Exclusive">Exclusive</option>
                        </select>
                        <span id="tax_type_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="profit_margin"><?= $this->lang->line('profit_margin'); ?>(%) <i class="hover-q " data-container="body" data-toggle="popover" data-placement="top" data-content="<?= $this->lang->line('based_on_purchase_price'); ?>" data-html="true" data-trigger="hover" data-original-title="">
                  <i class="fa fa-info-circle text-maroon text-black hover-q"></i>
                  </i></label>
                        <input type="text" class="form-control only_currency" id="profit_margin" name="profit_margin" placeholder="Profit in %">
                        <span id="profit_margin_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="sales_price" class="control-label"><?= $this->lang->line('sales_price'); ?><span class="text-danger">*</span></label>
                        <input type="text" class="form-control only_currency " id="sales_price" name="sales_price" placeholder="Sales Price">
                        <span id="sales_price_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
                  <div class="col-md-4">
                  <div class="box-body">
                     <div class="form-group">
                        <label for="mrp"><?= $this->lang->line('mrp'); ?><i class="hover-q " data-container="body" data-toggle="popover" data-placement="top" data-content="<?= $this->lang->line('mrp_definition'); ?>" data-html="true" data-trigger="hover" data-original-title="">
                  <i class="fa fa-info-circle text-maroon text-black hover-q"></i>
                  </i></label>
                        <input type="text" class="form-control only_currency" id="mrp" name="mrp" placeholder="Maximum Retail Price" >
                        <span id="mrp_msg" style="display:none" class="text-danger"></span>
                     </div>
                  </div>
               </div>
            </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-warning" data-dismiss="modal">Close</button>
          <button type="button" class="btn btn-primary" id="save">Save</button>
        </div>
      </div>
      <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
   <?= form_close();?>
  </div>
              <!-- /.modal -->