<?php if(Auth::user()->hasAnyPermission(['All','Store Inventory'])): ?>
<!-- Modal ADD PLOT/ARTICLE -->
<?php ($uniqid = uniqid()); ?>
<div class="modal fade" id="md_add_inventory" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <?php echo e(Form::open(array('route' => 'inventory.add', 'id' => 'form_add_inventory', 'class' => 'cls_form'))); ?>

  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Add <?php echo e(ucwords(str_replace('_',' ',$plot_labels['module']))); ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body ">
        <div class ="card">
          <div class = "card-body form-fieldset">
                 <div class="row">

                  <div class="col-sm-12">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['branch']))); ?>: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['rate'])),":message")); ?></small>

            <div class="input-group mb-3">
             
          
               <?php ($branch_label = EF::branchWhiteLabel()); ?>
                  <select onchange="projectWiseBlock(event,this,'<?php echo e($uniqid); ?>');" name="<?php echo e($branch_label['module']); ?>" class="form-control form-control-sm cls_selection project_<?php echo e($uniqid); ?>" >
                     <option value="<?php echo e(Crypt::encrypt(0)); ?>">Select <?php echo e(ucwords(str_replace('_',' ',$branch_label['module']))); ?></option>
                    <?php $__currentLoopData = $branch; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e(Crypt::encrypt($rows->id)); ?>"><?php echo e($rows->code); ?> <?php echo e($rows->name); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </select>
            </div>
          </div>

             <div class="col-sm-12">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['type']))); ?>: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['type'])),":message")); ?></small>

            <div class="input-group mb-3">
             
             <select onchange="verifyCategory(event,this,'<?php echo e($uniqid); ?>')" class="form-control form-control-sm cls_selection plot_type" name="<?php echo e($plot_labels['type']); ?>">
              <option value = "selected">Select <?php echo e(ucwords(str_replace('_',' ',$plot_labels['type']))); ?></option>
               <?php $__currentLoopData = EF::getTypeList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?></option>
               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
             </select>

            </div>
          </div>

                <div class="col-sm-12 floor_section_<?php echo e($uniqid); ?>">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['floor']))); ?>:<i style = "color:red;"></i></label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['floor'])),":message")); ?></small>

            <div class="input-group mb-3">
             
             <select class="form-control form-control-sm cls_selection plot_category" name="<?php echo e($plot_labels['floor']); ?>">
               <option value = "">Select <?php echo e(ucwords(str_replace('_',' ',$plot_labels['floor']))); ?></option>
               <?php $__currentLoopData = EF::getFloorList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?></option>
               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
             </select>

            </div>
          </div>

          <div class="col-sm-12">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['plot_name']))); ?>: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['plot_name'])),":message")); ?></small>
            <div class="input-group mb-3">
              <?php echo e(Form::Text($plot_labels['plot_name'], '', ['class' => 'form-control form-control-sm  cls_required', 'placeholder' => ucwords(str_replace('_',' ',$plot_labels['plot_name'])) , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>
             

         


     <!-- NORMAL BLOCK -->
              <div class="col-sm-6 ">
                <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$plot_labels['block']))); ?>: <i style = "color:red;"></i></label>
                <small class="form-errors pull-right req" value=""><?php echo e($errors->first($plot_labels['block'],":message")); ?></small>

                <div class="input-group mb-3">
                  <select onchange="showOtherBlockField(event,this,'<?php echo e($uniqid); ?>');"  name="<?php echo e($plot_labels['block']); ?>" class="form-control form-control-sm   normal_block_<?php echo e($uniqid); ?>">
                    <option value="selected" selected>Select Block</option>
                    <option value="Other">Other</option>
                  </select>
                </div>
              </div>
              <!-- END NORMAL BLOCK -->

              <!-- OTHER BLOCK -->
              <div class="col-sm-6 other_block_section_<?php echo e($uniqid); ?>" style="display: none;">
                <label class="label-color">Block Name: <i style = "color:red;"></i></label>
                <small class="form-errors pull-right req" value=""><?php echo e($errors->first('other_block',":message")); ?></small>

                <div class="input-group mb-3">
                   <input type="text" name="other_block" class="form-control form-control-sm normal_other_block_<?php echo e($uniqid); ?> cls_required" placeholder="Block Name">
                  
                </div>
              </div>

             <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['category']))); ?>:<i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['category'])),":message")); ?></small>

            <div class="input-group mb-3">
             
             <select class="form-control form-control-sm cls_selection plot_category" name="<?php echo e($plot_labels['category']); ?>">
               <option value = "selected">Select <?php echo e(ucwords(str_replace('_',' ',$plot_labels['category']))); ?></option>
               <?php $__currentLoopData = EF::getCategoryList(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                 <option value="<?php echo e($rows); ?>"><?php echo e($rows); ?></option>
               <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
             </select>

            </div>
          </div>

  
          
          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['size']))); ?>: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['size'])),":message")); ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::Email($plot_labels['size'], '', ['class' => 'form-control form-control-sm  cls_required', 'placeholder' => ucwords(str_replace('_',' ',$plot_labels['size'])) , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>

        
          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['dimension']))); ?>: <i style = "color:red;"></i></label>
            <small class="form-errors pull-right req" value=""><?php if($errors->any($plot_labels['dimension_x']) || $errors->any($plot_labels['dimension_y'])): ?> Dimension is invalid. <?php endif; ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::Number($plot_labels['dimension_x'], '', ['class' => 'form-control form-control-sm  cls_decimal_digit',  'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' , 'min' => '1'])); ?>

              <b style = "margin-left:5%; margin-right:5%;">X</b>

             
              <?php echo e(Form::Number($plot_labels['dimension_y'], '', ['class' => 'form-control form-control-sm  cls_decimal_digit', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' , 'min' => '1'])); ?>

            </div>
          </div>

                   <div class="col-sm-12">
 
             <input type="checkbox" name="parking_check" value="1"> <b>Parking Included ?</b>
             
   
          </div>

          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['rate']))); ?>:<i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['rate'])),":message")); ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::Text($plot_labels['rate'], '', ['class' => 'form-control form-control-sm  cls_required', 'placeholder' => ucwords(str_replace('_',' ',$plot_labels['rate'])), 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','onkeyup' => 'numberInWordsValue(this,"rate_into_words")'])); ?>

            </div>
          </div>

          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['rate']))); ?> Into Words:</label>
           

            <div class="input-group mb-3">
             
              <input placeholder="<?php echo e(ucwords(str_replace('_',' ',$plot_labels['rate']))); ?> In To Words" type="text" readonly="" class="form-control-sm form-control rate_into_words" >
            </div>
            
          </div>

          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['feature_charges']))); ?>:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['feature_charges'])),":message")); ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::Text($plot_labels['feature_charges'], '', ['class' => 'form-control form-control-sm  cls_required', 'placeholder' => ucwords(str_replace('_',' ',$plot_labels['feature_charges'])), 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','onkeyup' => 'numberInWordsValue(this,"feature_charges_into_words")'])); ?>

            </div>
            
          </div>

          <div class="col-sm-6">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['feature_charges']))); ?> Into Words:</label>
           

            <div class="input-group mb-3">
             
              <input placeholder="<?php echo e(ucwords(str_replace('_',' ',$plot_labels['feature_charges']))); ?> In To Words" type="text" readonly="" class="form-control-sm form-control feature_charges_into_words" >
            </div>
            
          </div>

          
           <div class="col-sm-12">
            <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$plot_labels['feature_description']))); ?>:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first(ucwords(str_replace('_',' ',$plot_labels['feature_description'])),":message")); ?></small>

            <div class="input-group mb-3">
             
              <?php echo e(Form::TextArea($plot_labels['feature_description'], '', ['class' => 'form-control form-control-sm  cls_required plot_features_des', 'placeholder' => ucwords(str_replace('_',' ',$plot_labels['feature_description'])), 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','rows'=>2, ])); ?>

            </div>
          </div>

          
        </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 <?php if(EF::getUrl() === 'plots'): ?> cls_submit <?php endif; ?>"  <?php if(EF::getUrl() != "plots"): ?> onclick="storeInventory(event,this)" <?php endif; ?>  content="add <?php echo e(ucwords(str_replace('_',' ',$plot_labels['module']))); ?>">Add <?php echo e(ucwords(str_replace('_',' ',$plot_labels['module']))); ?> </button>

      </div>
    </div>
  </div>
  <?php echo e(Form::close()); ?>

</div>
<!-- END MODAL ADD ARTICLE/PLOT -->
<?php endif; ?><?php /**PATH /var/www/skylite/resources/views/inventory/modals/add_inventory.blade.php ENDPATH**/ ?>