 <!-- Modal Add Supply Tank -->
 <form id="addNewAddressForm"  class="row g-3 fv-plugins-bootstrap5 fv-plugins-framework needs-validation validation"  novalidate="" method="POST" action="<?php echo e(route('distribution_quantity_to_tank')); ?>">
    <?php echo csrf_field(); ?>
<div class="modal fade modalFeather" id="addTank" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-simple modal-add-new-address">
      <div class="modal-content">
        <div class="modal-header">
            <h4 class="modal-title"><strong>توزيع كمية جديدة للخزانات</strong></h4>
            <i type="reset" data-bs-dismiss="modal" aria-label="Close" class="las las la-times text-danger scale5"></i>
        </div>
        <div class="modal-body">

                <div class="row">
                    <div class="col-md-6 mb-2">
                            <label class="form-label titleInput" for="validationCustom01">اسم الموظف<span class="text-danger">*</span>
                            </label>
                                <select class="form-control form-white inputRead" data-placeholder="Choose a color..." name="employeeId" required>
                                    <option disabled="disabled" selected value="">الرجاء تحديد الموظف المستلم للكمية</option>
                                    <?php $__currentLoopData = $employees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $employee): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if(isset($employee->user->role)): ?>
                                    <?php if($employee->user->role==3): ?>
                                    <option value="<?php echo e($employee->user->id); ?>"><?php echo e($employee->user->name); ?></option>
                                    <?php endif; ?>
                                    <?php endif; ?>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <div class="invalid-feedback">
                                   يرجاء تحديد اسم الموظف المستلم
                                </div>
                                <?php $__errorArgs = ['employeeId'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger px-2 showModalAdd ">
                                    <?php echo e($message); ?>

                                    </div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <div class="col-md-6 mb-2">
                            <label class="form-label titleInput" for="validationCustom05">الخزان
                                <span class="text-danger">*</span>
                            </label>
                                <select
                                class="form-control form-white inputChecked typePetrodiesel typeTank inputRead" data-placeholder="Choose a color..." name="tankId" required>
                                    <option value="-1" selected disabled>اختر احدى الخزانات</option>
                                    <?php $__currentLoopData = $tanks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tank): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if($tank->capacity - $tank->quantity > 0): ?>
                                        

                                    <option value="<?php echo e($tank->id); ?>" data-type_tank="<?php echo e($tank->type); ?>" class="tank-list">  الخزان رقم.<?php echo e($tank->id); ?>

                                        <?php if($tank->type==0): ?>
                                       - ( بترول ) -
                                    <?php else: ?>
                                        ( ديزل ) -
                                    <?php endif; ?>
                                         المساحة الغارغة <?php echo e($tank->capacity - $tank->quantity); ?> لتر
                                    </option>
                                    <?php endif; ?>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <div class="invalid-feedback">
                                    يرجاء تحديد احدى الخزانات
                                </div>
                                <?php $__errorArgs = ['tankId'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger px-2 showModalAdd ">
                                    <?php echo e($message); ?>

                                    </div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                        </div>

                    <div class="col-md-6 mb-2">
                            <label class="form-label titleInput" for="validationCustom05">التوريدة الموزع منها
                                <span class="text-danger">*</span>
                            </label>
                            <select class="form-control form-white suppliesSelectedList supplyChecked inputRead" data-placeholder="Choose a color..." name="supplyId"  required>
                                <option disabled selected value="">الرجاء اختيار احدى التوريدات</option>
                                <?php $__currentLoopData = $supplies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $supply): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php
                                     $summiton = 0;
                                        foreach ($storeQuantities as $storeQuanty) {
                                            if($storeQuanty->supply_id==$supply->id)
                                              {$summiton+=$storeQuanty->quantity;}
                                        }
                                        $empty = $supply->quantity - $summiton;
                                    ?>
                                <?php if($empty>1): ?>
                                <option value="<?php echo e($supply->id); ?>" data-name="<?php echo e($supply->notice); ?>" hidden data-quantity="<?php echo e($empty); ?>"  class="supplies-account"><?php echo e($supply->notice); ?> الكمية <?php echo e($empty); ?></option>
                               <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <div class="invalid-feedback">
                                يرجاء اختيار احد التوريدات
                            </div>
                            <?php $__errorArgs = ['supplyId'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger px-2 showModalAdd ">
                                <?php echo e($message); ?>

                                </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="col-md-6">
                            <label class="form-label titleInput" for="validationCustom06">الكمية
                                <span class="text-danger">*</span>
                            </label>
                            <div class="col-lg-12">
                                <input name="quantity" value="<?php echo e(old('quantity')); ?>" type="number" class="form-control inputChecked supplyChecked inputRead" id="validationCustom06" placeholder="ادخل الكمية.." required="" required="">
                                <div class="invalid-feedback">
                                    يرجاء ادخل الكمية بشكل صحيح
                                </div>
                                <?php $__errorArgs = ['quantity'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <div class="text-danger px-2 showModalAdd ">
                                    <?php echo e($message); ?>

                                    </div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                <div class="errorMassege" style="color: red;font-size: 0.875em;margin-top: 0.25rem"></div>
                            </div>
                        </div>

                    </div>
                    <div class="modal-footer">
                        <button type="button"
                        data-title="هل انت متأكد من هذه التوريدة ؟"
                         class="btn btn-primary me-sm-3 me-1 btnValidation showModal">اضافة</button>
                        <button type="reset" class="btn btn-label-secondary" data-bs-dismiss="modal" aria-label="Close">الغاء</button>
                      </div>

                  </div>
              </div>
            </div>
</div>
<?php echo $__env->make('print_confirmation.print_confirmation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</form>
<?php /**PATH C:\Users\Nasser\Desktop\petrol_store\resources\views/supply/modals_tank/new.blade.php ENDPATH**/ ?>