


<?php $__env->startSection('title'); ?>
    تقييـــــد أكثر من عملية |  توزيعة للعملاء
<?php $__env->stopSection(); ?>

<?php $__env->startSection('first-css'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('header-content'); ?>
    تقييـــــد أكثر من عملية | توزيعة للعملاء
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-body'); ?>
    <!--**********************************
                Content body start
            ***********************************-->
    <?php echo $__env->make('massages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    
    <!-- row -->
    <div class="row" style="width: 95%; margin:auto;">
        <div class="col-xl-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title">توزيعة جديدة</h4>
                </div>
                <div class="card-body pb-3 tran">
                    <div class="form-validation">
                        <form class="validation need-validation" novalidate method="POST" action="<?php echo e(route('storeMultiDistributions')); ?>">
                            <?php echo csrf_field(); ?>
                            <div class="row">
                                <div class="col-xl-12">
                                    <div class="mb-3 row">
                                        <label class="col-lg-12 col-form-label  titleInput" for="validationCustom01">
                                            التوريدة المراد توزيعها <span class="text-danger">*</span>
                                        </label>
                                        <div class="col-lg-12">
                                            <select class="form-control form-white inputRead supplyId" onchange="getQuantity()"
                                                data-placeholder="Choose a color..." name="supplyId" required>
                                                <option disabled="disabled" selected value="">الرجاء اختيار احدى
                                                    التوريدات
                                                </option>
                                                <?php $__currentLoopData = $supplies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $supply): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php if($supply->quantity > $supply->distributionTotal): ?>
                                                        <option value="<?php echo e($supply->id); ?>">
                                                            <?php echo e($supply->notice); ?> متبقي -
                                                            <?php echo e($supply->quantity - $supply->distributionTotal); ?>

                                                        </option>
                                                    <?php endif; ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <div class="invalid-feedback">
                                                يرجاء اختيار احد التوريدات
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </div>
                            <table  class="tableSpicial">
                                <thead>
                                    <th>العميل</th>
                                    <th>الكمية</th>
                                    <th>العمولة</th>
                                    <th>ملاحظة</th>
                                </thead>
                                <tbody id="inputs">
                                    <tr class="tr_data inputs-border-radius-0">
                                        <td>
                                            <select class="form-control form-white clintInfo inputRead " data-placeholder="Choose a color..." name="clintName[]" required>
                                                <option disabled selected value="">الرجاء اختيار احد العملاء</option>
                                                <?php if(isset($niceNames)): ?>
                                                    <?php $__currentLoopData = $niceNames; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $niceName): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option class="accounts-client" value="<?php echo e($niceName); ?>">
                                                            <?php echo e($niceName); ?>

                                                        </option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <?php endif; ?>
                                            </select>
                                        </td>

                                        <td>
                                            <input name="quantity[]" onblur="getquantity(0)" type="number" class="form-control inputRead quantity"
                                                id="validationCustom06" placeholder="ادخل الكمية.." required="">
                                        </td>
                                        <td>
                                            <input name="rate[]" type="number" class="form-control inputRead rate"
                                                id="validationCustom06" placeholder="ادخل العمولة.." value="0">
                                        </td>
                                        <td>
                                            <input name="notice[]" type="text" class="form-control inputRead notice"
                                                id="validationCustom06" placeholder="ادخل الملاحظة.." >
                                        </td>
                                        <td style="cursor: pointer; padding: 5px; text-align: center" class="delete" onclick="deleteTage(0)">
                                            <span class="text-danger fs-4 fw-bold form-control">X</span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>

                            <div class="col-xl-12" style="direction: rtl;">
                                <span id="add" onclick="addNewRow()" class="btn btn-success">+</span>
                            </div>

                            <div class="col-xl-12" style="direction: ltr;">
                                <button type="button" class="btn btn-primary me-sm-3 me-1 showModal"
                                    data-title="هل تريد تقييد هذه التوزيعة ؟">تقييد </button>
                            </div>

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

        </div>
    </div>



    <!--**********************************
                Content body end
            ***********************************-->
    <script src="<?php echo e('/js/add-input/distribution.js'); ?>"></script>
    <script src="<?php echo e(asset('/js/quickly/print_confirmation_distribution.js')); ?>"></script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script src="<?php echo e('/js/add-inputs.js'); ?>"></script>

    <script src="<?php echo e(asset('/vendor/datatables/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('/js/plugins-init/datatables.init.js')); ?>"></script>
    <script src="<?php echo e(asset('/js/validation.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('coupons.inputs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Nasser\Desktop\petrol_store\resources\views/quickly/distribution.blade.php ENDPATH**/ ?>