<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
  
            <!-- begin:: Content Head -->
            <div class="kt-subheader  kt-grid__item" id="kt_subheader">
              <div class="kt-container  kt-container--fluid ">
                <div class="kt-subheader__main">
                  <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                  <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                  <span class="kt-subheader__desc"><a href="<?=base_url('orders/')?>"><?php echo $this->lang->line('invoices') ?></a></span>
                </div>
                
              </div>
            </div>
    <!-- Content Header (Page header) -->
  <div class="row">
    <div class="col-md-12">
      <div class="box box-primary" style="padding: 20px">
        <div class="box-header with-border">
          <h3 class="box-title"><?php echo $this->lang->line('add-an-invoice') ?></h3>
        </div>
         <?php if(isset($msg) || validation_errors() !== ''): ?>
        <div class="alert alert-warning alert-dismissible">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            <h4><i class="icon fa-warning"></i> Alert!</h4>
            <?= validation_errors();?>
            <?= isset($msg)? $msg: ''; ?>
        </div>
        <?php endif; ?>  
        <?php echo form_open_multipart(base_url(''.$thispage.'/add/')); ?>
          <div class="box-body">
        
            <div class="form-group">
              <label><?php echo $this->lang->line('products') ?></label>
               <!-- select2 class remove filter box for product   -->
                    <!-- below select tag  -->
              <br><select class="form-control " name="id_producer[]"   dir="rtl" multiple="multiple" required>
                <?php $count=0; foreach($bills_producer as $row){?>
                  <option  value="<?= $row['id']; ?>"><?= $row['name']; ?></option>
               
                      <?php }?>
                </select>
            </div>
            <div class="form-group">
              <label for="exampleInputEmail1"><?php echo $this->lang->line('the-students') ?></label>
              <br>  
               <select  class="form-control" name="id_user[]" multiple="multiple" dir="rtl" data-placeholder="<?php echo $this->lang->line('choose') ; echo $this->lang->line('students'); ?>" required>  <?php $count=0; foreach($bills_user  as $row){?>
                   <option value="<?= $row['id']; ?>"><?= $row['username']; ?></option>
                   <?php } ?>
               </select>
               <!-- <select  class="form-control select2" name="id_user[]" multiple="multiple" dir="rtl" data-placeholder="<?php echo $this->lang->line('choose') ; echo $this->lang->line('students'); ?>" >  <?php $count=0; foreach($bills_user  as $row){?>
                   <option value="<?= $row['id']; ?>"><?= $row['username']; ?></option>
                   <?php } ?>
               </select> -->
            </div>
            <div class="form-group">
              <label><?php echo $this->lang->line('the-beginning-and-end-of-the-subscription') ?></label>

                <div class="input-group">
                  <!-- <div class="input-group-addon"style="border-left:#000;">
                    <i class="fa fa-calendar"></i>
                  </div> -->
                  <input type="text" class="form-control pull-right datepicker" id="" name="start_expiry" required>
              </div>
              <!-- /.input group -->
            </div>
                     
            <script> 
               function show() { 
                  document.getElementById('benefits').style.display='block'; 
              } 
               function show2() { 
                 document.getElementById('benefits').style.display='none';   
              } 
            </script> 
            <div class="form-group">
              <label>  <?php echo $this->lang->line('custom-fee') ?></label>
              <div class="radio">
                <input type="radio" name="paymentnew2"  value="1" onclick="show();" required>
                  <label> <?php echo $this->lang->line('yes') ?>
                    </label>
              </div>
              <div class="radio">
                  <input type="radio" name="paymentnew2"  value="2"  checked=""  onclick="show2();">
                  <label> <?php echo $this->lang->line('no') ?>
                    </label>
              </div>
            </div>    
            <div class="form-group" id="benefits" style="display: none">
              <label for="exampleInputPassword1">  <?php echo $this->lang->line('custom-fee') ?>	</label>
              <input type="number" class="form-control" id="exampleInputPassword1" placeholder="<?php echo $this->lang->line('enter-the-custom-price-if-any') ?>" name="paymentnew" value="0" >
            </div>
            <div class="form-group">
                <label> <?php echo $this->lang->line('payment') ?> <?php echo $this->lang->line('status') ?></label>
              <div class="radio">
                  <input type="radio" name="paid"  value="1"  checked="" required>
                  <label>   <?php echo $this->lang->line('payment-is-made') ?>
                    </label>
              </div>
              <div class="radio">
                  <input type="radio" name="paid"  value="2">
                  <label>   <?php echo $this->lang->line('not-paid') ?>
                      </label>
              </div>
              <div class="radio">
                  <input type="radio" name="paid"  value="3">
                  <label>  <?php echo $this->lang->line('complimentary') ?> 
                  </label>
              </div>
              <div class="radio">
                <input type="radio" name="paid"  value="4">
                  <label> <?php echo $this->lang->line('retriever') ?>
                </label>
              </div> 
            </div>   
            <div class="form-group">
              <label><?php echo $this->lang->line('note') ?></label>
              <textarea class="form-control" rows="3" placeholder="<?php echo $this->lang->line('describe') ?>.." name="note"></textarea>
            </div>
            <div class="form-group">
              <label for="exampleInputPassword1"> <?php echo $this->lang->line('discount') ?>		</label>
              <input type="number" class="form-control" id="exampleInputPassword1" placeholder="<?php echo $this->lang->line('discount') ?> " name="discount" >
            </div>
            <div class="form-group">
                <label><?php echo $this->lang->line('the-reason-for-the-discount') ?>    </label>
                <textarea class="form-control" rows="3" placeholder="<?php echo $this->lang->line('describe') ?>..." name="discount_why"></textarea>
            </div>
          </div>
          <div class="box-footer">
                <button type="submit" class="btn btn-primary" name="submit" value="pl"><?php echo $this->lang->line('addition') ?></button>
          </div>
        </form>
      </div>
    
    </div>
  </div>
