<div class="row">
 



<?php if(!isset($loan_id)): ?>


                        <div class="col-sm-4">
                            <label class="label-color"> Select Type: <i style = "color:red;"></i></label>

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

                            <div class="input-group mb-3">
                            
                              <?php if(isset($generic_type->id)): ?>

                                <input type="hidden" name="generic_type[]" value="<?php echo e(Crypt::encrypt($generic_type->id)); ?>">

                                <input readonly="" class="form-control form-control-sm" type="text" name="" value="<?php echo e($generic_type->name); ?>">

                              <?php else: ?>
                                <select id="generic_type_<?php echo e($unique_id); ?>" name="generic_type[]" class="form-control form-control-sm cls_selection" onchange="getGenericPaymentList('<?php echo e($unique_id); ?>','<?php echo e(Crypt::encrypt(0)); ?>');">
                                  <option value="<?php echo e(Crypt::encrypt(0)); ?>">Select Type</option>
                                  <?php if(isset($generic_list)): ?>
                                    <?php $__currentLoopData = $generic_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                   
                                      <option <?php if(isset($generic_type) && $generic_type === $rows->id): ?> selected="true"   <?php endif; ?> value="<?php echo e(Crypt::encrypt($rows->id)); ?>"><?php echo e($rows->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  <?php endif; ?>

                                </select>
                              <?php endif; ?>
                     
                            </div>
                        </div>

      <div class="col-sm-4" id="booking_section_<?php echo e($unique_id); ?>"  <?php if(!isset($booking->id)): ?> style="display:none;" <?php endif; ?> >
         <label class="label-color"> Booking: <i style = "color:red;"></i></label>

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

                            <div class="input-group mb-3">
                              
                              <?php if(isset($booking->id)): ?>
                                <input type="hidden" name="booking[]" value="<?php echo e(Crypt::encrypt($booking->id)); ?>">
                                <input readonly="" class="form-control form-control-sm" value="<?php echo e($booking->ms); ?> (<?php echo e(EF::showPlotFormat($booking->plot)); ?>">
                              <?php else: ?>
                                <select  id="booking_<?php echo e($unique_id); ?>" name="booking[]" class="form-control form-control-sm cls_selection" onchange="getPaymentList(this,'<?php echo e($unique_id); ?>','<?php echo e(Crypt::encrypt(0)); ?>')">
                                  <option value="<?php echo e(Crypt::encrypt(0)); ?>">Select Booking</option>
                                  <?php if(isset($booking_list)): ?>
                                    <?php $__currentLoopData = $booking_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if($rows->is_block == 0): ?>
                                      <option <?php if(isset($booking->id)): ?> <?php if($booking->id == $rows->id): ?> selected <?php endif; ?> <?php endif; ?> value="<?php echo e(Crypt::encrypt($rows->id)); ?>"> <?php echo e($rows->ms); ?>

                                       
                                         (<?php echo e(EF::showPlotFormat($rows->plot)); ?>


                                         <?php if(ucfirst($rows->plot->category) == "Residential"): ?>-R <?php elseif(ucfirst($rows->plot->category) == "Commercial"): ?>-C <?php endif; ?>)
                                      </option>
                                      <?php endif; ?>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  <?php endif; ?>

                                </select>
                              <?php endif; ?>
                     
                            </div>
                        </div>
                          <div class="col-sm-4">
                                   <label class="label-color"> Payment Type: <i style = "color:red;"></i></label>
                            <small class="form-errors pull-right req" value=""><?php echo e($errors->first('payment type',":message")); ?></small>

                            <div class="input-group mb-3">
                              
                              <select id="payment_type_<?php echo e($unique_id); ?>" name="payment[]" class="form-control form-control-sm cls_selection" onchange="getPayment(this,'<?php echo e($unique_id); ?>');">

                                <option value="<?php echo e(Crypt::encrypt(0)); ?>">Select Payment Type</option>

                                <?php if(isset($payment->id)): ?>
                                  <option selected value="<?php echo e(Crypt::encrypt($payment->id)); ?>"><?php echo e($payment->description); ?></option>
                                <?php endif; ?>

                                <?php if(isset($payment_list)): ?>
                                  <?php $__currentLoopData = $payment_list; $__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->description); ?></option>
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>


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

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

                            <div class="input-group mb-3">
                             
                              <input <?php if(isset($payment->id)): ?> readonly <?php endif; ?> value="<?php if(isset($amount)): ?> <?php echo e($amount); ?> <?php endif; ?>" type="text" name="amount[]" id="amount_<?php echo e($unique_id); ?>" placeholder="Amount" class="form-control form-control-sm cls_selection req" aria-label="Default" aria-describedby = "inputGroup-sizing-default" onkeyup = 'numberInWordsValue(this,"amount_in_words')">

                     
                            </div>
                        </div>

                        <?php else: ?>

            <input type = "hidden" name = "payment_type[]" value = "<?php echo e(Crypt::encrypt(0)); ?>"/>
            <input type = "hidden" name = "booking[]"      value = "<?php echo e(Crypt::encrypt(0)); ?>"/>

                         <div  class="col-sm-6">
                                 <label class="label-color"> Description: </label>
                            <small class="form-errors pull-right" value=""><?php echo e($errors->first('description',":message")); ?></small>

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

                              <input type = "text" class = "form-control form-control-sm" name= "description" value ="Loan Amount"  readonly = "true"/>
  
                            </div>
                        </div>
                                <div  class="col-sm-6">
                                 <label class="label-color"> Amount: <i style = "color:red;">*</i></label>
                            <small class="form-errors pull-right req" value="*"><?php echo e($errors->first('amount',":message")); ?></small>

                            <div class="input-group mb-3">
                             
                              <input <?php if(isset($payment->id)): ?> readonly <?php endif; ?> value="<?php if(isset($amount)): ?> <?php echo e($amount); ?> <?php endif; ?>" type="text" name="amount[]" id="amount_<?php echo e($unique_id); ?>" placeholder="Amount" class="form-control form-control-sm cls_selection req" aria-label="Default" aria-describedby = "inputGroup-sizing-default" onkeyup = 'numberInWordsValue(this,"amount_in_words')">

                     
                            </div>
                        </div>
                        <?php endif; ?>

          
                      </div><?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/components/voucher/booking_section.blade.php ENDPATH**/ ?>