

<?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
                ***********************************-->
    <!-- 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" novalidate="" method="POST" action="<?php echo e(route('storeBuying')); ?>">
                            <?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 name="type"
                                            class="form-control form-white form-control-sm typePetrodiesel inputRead"
                                            id="type" required onchange="functionSelect()">
                                            <option value="-1" selected="selected" disabled="disabled">الرجاء
                                                اختيار احدى الأنواع</option>
                                            <option value=0 rel="petrolselect">بترول</option>
                                            <option value=1 rel="desilselect">ديزيل</option>

                                        </select>
                                        <div class="invalid-feedback">
                                            الرجاء اختيار احدى الخيارات الموجودة
                                        </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xl-6">
                                    <div class="mb-3 row">
                                        <label class="col-lg-12 col-form-label titleInput" for="validationCustom05">اسم العميل
                                            <span class="text-danger">*</span>
                                        </label>
                                        <div class="col-lg-12">
                                            <select class="form-control form-white inputRead inputChecked" data-placeholder="Choose a color..."
                                            id="dieselSelectList" name="name" required>

                                            <option disabled selected value="">الرجاء اختيار احد العملاء
                                            </option>

                                            <?php $__currentLoopData = $clients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $client): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php if($client->balance>1): ?>
                                                <option hidden value="<?php echo e($client->name); ?>" class="account_clint p-2">
                                                    <?php echo e($account->deleteTypeAccount($client->name)); ?>

                                                    متبقي له <?php echo e($client->balance); ?> لتر </option>
                                            <?php endif; ?>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                        </select>
                                        <div class="invalid-feedback">
                                            الرجاء اختيار الاسم
                                        </div>

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

                                <div class="col-xl-6">

                                    <div class="mb-3 row">
                                        <label class="col-lg-12 col-form-label titleInput" for="validationCustom06">الكمية
                                            <span class="text-danger">*</span>
                                        </label>
                                        <div class="col-lg-12">
                                            <input name="quantity" type="number" class="form-control inputRead inputChecked "
                                                id="validationCustom06" placeholder="ادخل الكمية.." required="">
                                            <div class="invalid-feedback">
                                                يرجاء ادخل الكمية بشكل صحيح
                                            </div>
                                            <div class="errorMassege" style="color: red;font-size: 0.875em;margin-top: 0.25rem"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-12" style="direction: ltr;">
                                <button type="button" class="btn btn-primary me-sm-3 me-1 showModal btnValidation"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
                ***********************************-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('/js/selected/selected.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>
    <script src="<?php echo e(asset('/js/validation/validationQuantity.js')); ?>"></script>

<?php $__env->stopSection(); ?>

<?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/buying/create.blade.php ENDPATH**/ ?>