<?php if(Auth::user()->hasAnyPermission(['All','Make Booking'])): ?>

<?php ($label_list = EF::getWhiteLabel()); ?>
<div class="modal fade" id="md_make_booking" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <?php echo e(Form::open(array('route' => 'booking.store', 'id' => 'form_add_booking', 'class' => 'cls_from'))); ?>

  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Make Booking</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-header">

         <div class = "col-md-5">
    <strong class="strong-margin">CUSTOMER DETAILS</strong>
     </div>
              <div class = "col-md-6">


     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/userinformation.png')); ?>"/>

     </div>

          </div>
          <div class = "card-body  form-fieldset">
            <div class = "row">
             <div class="col-sm-6">
                <label class="label-color"> CNIC: <i style = "color:red;">*</i></label>
            <small class="form-errors  req" value="*"><?php echo e($errors->first('customer_cnic',":message")); ?> </small>
            <div class="input-group mb-3">

              <?php echo e(Form::Text('customer_cnic', '', ['class' => 'form-control form-control-sm  cls_cnic' ,'data-mask' => '00000-0000000-0', 'data-mask-clearifnotmatch' => 'true' ,'placeholder' => '00000-0000000-0'  , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','onchange' => 'validateCnic(event,this)'])); ?>

            </div>
          </div>

          <div class="col-sm-6">
              <label class="label-color"> Name: <i style = "color:red;">*</i></label>
            <div class="input-group mb-3">

              <?php echo e(Form::Text('customer_name', '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  ', 'placeholder' => 'Name' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'readonly' => 'true'])); ?>

            </div>

            <input type="hidden" name="user_id" >
          </div>
          </div>
        </div>
      </div>
      <div class = "card">
        <div class = "card-header">

         <div class = "col-md-5">
    <strong class="strong-margin">BOOKING DETAILS</strong>
     </div>
              <div class = "col-md-6">


     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/booking.png')); ?>"/>


     </div>

        </div>
        <div class = "card-body  form-fieldset">
          <div class = "row">
               <div class="col-sm-4">
                <label class="label-color"> <?php echo e(ucwords(str_replace('_',' ',$label_list['file']))); ?> # <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first($label_list['file'],":message")); ?></small>

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['file'], '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  cls_required', 'placeholder' => ' File # ' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','readonly' => 'true'])); ?>

            </div>
          </div>

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

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['reference'], '', ['readonly' => 'true','class' => 'form-control form-control-sm  form-control form-control-sm -sm  cls_required reference', 'placeholder' => 'Reference # ' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>

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

            <div class="input-group mb-3">

              <?php echo e(Form::Date($label_list['booking_date'],date('Y-m-d'), ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  cls_date', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>

          </div>
            <?php if(Auth::user()->hasAnyPermission(['All','Make Soft Booking'])): ?>
          <div class="col-sm-12" style="text-align: right;">
             <div class="form-check form-check-inline">
                  <input onchange="checkReserveBooking(event,this)" class="form-check-input" name="reserve_booking" type="checkbox" >
                <label  class="form-check-label">Soft Booking</label>
              </div>
          </div>


           

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

            <div class="input-group mb-3">

              <?php echo e(Form::Date($label_list['end_date'], '', ['class' => 'form-control form-control-sm reserve_edate  form-control form-control-sm -sm  cls_date', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>

          </div>
          <?php endif; ?>

          </div>
        </div>
      </div>
      <div class = "card">
        <div class = "card-header">

         <div class = "col-md-5">
    <strong class="strong-margin"> <?php echo e(strtoupper(str_replace('_',' ',$label_list['plot']))); ?> DETAILS </strong>
     </div>
              <div class = "col-md-6">


     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/branchinformation.png')); ?>"/>


     </div>

        </div>
        <div class = "card-body  form-fieldset">
          <div class = "row">
              <?php if(Auth::user()->hasAnyPermission(['All','Store Inventory'])): ?>
             <div class="col-sm-12">
               <button onclick="requestOpenModal(event,'md_add_inventory','md_make_booking')" style="float:right; font-weight: bolder;" class="btn-primary btn-sm">Add <?php echo e(strtoupper(str_replace('_',' ',$label_list['plot']))); ?></button>
             </div>
             <?php endif; ?>
       <div class="col-sm-4">
              <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$label_list['branch']))); ?>: <i style = "color:red;">*</i></label>
            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first($label_list['branch'],":message")); ?></small>

            <div class="input-group mb-3">

                    <?php echo $__env->make('layouts.common.branch', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            </div>
          </div>

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

            <div class="input-group mb-3">

              <?php ($plot_list = ['0' => 'Select Article']); ?>



             <?php echo e(Form::select($label_list['plot'], $plot_list, '' , array('class' => 'form-control form-control-sm   cls_selection plot_list fstdropdown-select', 'data-searchdisable' => 'false', 'onChange' => 'getPlotInfo(event,this)'))); ?>

            </div>
          </div>

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

            <div class="input-group mb-3">
                <input class="form-control form-control-sm type" type="text" readonly="" name="<?php echo e($label_list['type']); ?>" placeholder="<?php echo e(ucwords(str_replace('_',' ',$label_list['type']))); ?>">

              <?php ($type_list = ['selected' => 'Select Type']); ?>


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



            <div class="input-group mb-3">
              <input class="form-control form-control-sm category" type="text" readonly="" name="<?php echo e($label_list['category']); ?>" placeholder="<?php echo e(ucwords(str_replace('_',' ',$label_list['category']))); ?>">
   

            </div>
          </div>


     

            <div class="col-sm-6">
                 <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$label_list['size']))); ?>: <i style = "color:red;">*</i></label>

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['size'], '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  cls_date size','readonly' => 'true' , 'placeholder' => ucwords(str_replace('_',' ',$label_list['size'])), 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])); ?>

            </div>
          </div>

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

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['total_amount'], '', ['class' => 'form-control form-control-sm cls_required rate' , 'placeholder' => 'Total Price' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'onkeyup' => 'calculateAgreed()','readonly'=>'true'])); ?>

            </div>
          </div>
             <div class="col-sm-8">
            <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-4">
            <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$label_list['feature_charges']))); ?>:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first($label_list['feature_charges'],":message")); ?></small>

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['feature_charges'], '', ['class' => 'form-control form-control-sm   cls_required feature_charges' , 'placeholder' => 'Feature Charges' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'onkeyup' => 'calculateAgreed()','readonly' => 'true'])); ?>

            </div>
          </div>
           <div class="col-sm-8">
              <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$label_list['feature_description']))); ?>:</label>
            <div class="input-group mb-3">

              <?php echo e(Form::Text('', '', ['class' => 'form-control form-control-sm   feature_description','readonly' => 'true' , 'placeholder' => 'Feature Description' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' , 'onkeyup' => 'calculateAgreed()'])); ?>

            </div>
          </div>

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

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['discount'], '', ['class' => 'form-control form-control-sm  discount', 'placeholder' => 'Discount' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' , 'onkeyup' => 'calculateAgreed()'])); ?>

            </div>
          </div>

          <div class="col-sm-8">
              <label class="label-color">Discount In Words:</label>
            <div class="input-group mb-3">

              <?php echo e(Form::Text('', '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  discount_inwords','readonly' => 'true' , 'placeholder' => 'Discount In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default' , 'onkeyup' => 'calculateAgreed()'])); ?>

            </div>
          </div>


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

            <div class="input-group mb-3">

              <?php echo e(Form::Text($label_list['agreed_amount'], '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  agreed_amount', 'readonly' => 'true' , 'placeholder' => 'Agreed Amount' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'onkeyup' => 'calculateAgreed()'])); ?>

            </div>
          </div>

          <div class="col-sm-8">
              <label class="label-color">Agreed Amount In Words:</label>
            <div class="input-group mb-3">

              <?php echo e(Form::Text('', '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm  agreed_inwords','readonly' => 'true' , 'placeholder' => 'Agreed Amount In Words' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default', 'onkeyup' => 'calculateAgreed()'])); ?>

            </div>
          </div>
                     <div class="col-sm-12">
                    <label class="label-color"><?php echo e(ucwords(str_replace('_',' ',$label_list['remarks']))); ?>:</label>
                  <?php echo e(Form::Textarea($label_list['remarks'], '', ['class' => 'form-control form-control-sm  form-control form-control-sm -sm ', 'placeholder' => 'Remarks' , 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default','rows' => 2])); ?>

             </div>

          </div>
        </div>
      </div>

       <div class = "card">
        <div class = "card-header">

         <div class = "col-md-5">
    <strong class="strong-margin">SALES DETAILS</strong>
     </div>
              <div class = "col-md-6">

     </div>
             <div class = "col-md-1">
           <img src = "<?php echo e(asset('assets/images/icons/sales.png')); ?>"/>


     </div>

        </div>
        <div class = "card-body  form-fieldset">
          <div class = "row">



            <div class="col-sm-6">
                <label class="label-color">Select Salesperson :</label>


            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('employee',":message")); ?></small>


            <div class="input-group mb-3">


               <?php ($employee_list = []); ?>
               <?php $__currentLoopData = $employee; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <?php ($employee_list += [Crypt::encrypt($rows->id) => ucfirst($rows->name).' '.ucfirst($rows->designation->title)]); ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <?php echo e(Form::select('employee[]', $employee_list, '' , array('class' => 'form-control form-control-sm  form-control form-control-sm -sm  employee_list cls_selection','multiple'=>'multiple'))); ?>


       <?php if(Auth::user()->hasAnyPermission(['All','Add Employee'])): ?>
            <small class="btn-sm btn-primary plus-button" onclick="showModal('form_add_employee','md_add_employee')"><i class="fa fa-plus"> </i></small>
            <?php endif; ?>
            </div>
          </div>
              <div class="col-sm-6">
               <label class="label-color">Select Dealer:</label>
            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('dealer',":message")); ?></small>

            <div class="input-group mb-3">

               <?php ($dealer_list = []); ?>
               <?php $__currentLoopData = $dealer; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
              <?php ($dealer_list += [Crypt::encrypt($rows->id) => ucfirst($rows->name).' ('.ucfirst($rows->type).')']); ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <?php echo e(Form::select('dealer[]', $dealer_list, '' , array('class' => 'form-control form-control-sm  form-control form-control-sm -sm  dealer_list cls_selection', 'multiple'=>'multiple'))); ?>

                   <?php if(Auth::user()->hasAnyPermission(['All','Add Dealer'])): ?>
             <small class="btn-sm btn-primary plus-button" onclick="showModal('form_add_dealer','md_add_dealer')"><i class="fa fa-plus"> </i></small>
             <?php endif; ?>
            </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 cls_submit" content="make booking">Submit Booking</button>
      </div>
    </div>
  </div>
  <?php echo e(Form::close()); ?>

</div>
<?php endif; ?>

<?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/booking/modals/make_booking.blade.php ENDPATH**/ ?>