
<?php $__env->startSection('title'); ?>
    عرض توزيعات المورد
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('header-content'); ?>
عرض توزيعات
<?php if(isset($distributions)): ?>
<?php if(isset($distributions[0]->type)): ?>
<?php if($distributions[0]->type == 0): ?>
    البترول
<?php else: ?>
    الديزل
<?php endif; ?>
<?php endif; ?>

<?php endif; ?>

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

<?php $__env->startSection('content-body'); ?>
    <!--**********************************
                        Content body start
                    ***********************************-->
    <!-- row -->
    <?php echo $__env->make('massages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <div class="container-fluid">
        <!--**********************************Tabs Start***********************************-->
        <div class="d-flex flex-wrap align-items-center mb-3">
            <div class="mb-3 ms-auto">
                <div class="card-tabs style-1 mt-3 mt-sm-0">
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" href="javascript:void(0);" data-bs-toggle="tab" id="transaction-tab"
                                data-bs-target="#AllTransaction" role="tab">جميع التوزيعات</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link " href="javascript:void(0);"   >المورد <span>
                                <?php if(isset($distributions)): ?>
                                <?php if(isset($distributions[0])): ?>
                                <?php echo e($userService->deleteTypeAccount($distributions[0]->supply->supplier->name)); ?>

                                <?php endif; ?>
                                <?php endif; ?>
                            </span></a>
                        </li>
                        
                    </ul>
                </div>
            </div>

        </div>
        <!--**********************************Tabs End***********************************-->
        <div class="row">
            <div class="col-xl-12 tab-content">
                <!--**********************************Table AllTransaction Start***********************************-->
                <div class="tab-pane fade show active" id="AllTransaction" role="tabpanel"
                    aria-labelledby="transaction-tab">
                    <div class="table-responsive fs-14">
                        <table class="table card-table display mb-4 dataTablesCard text-black text-center" id="example">
                            <thead>
                                <tr>
                                    <th>رقم </th>
                                    <th>العميل</th>
                                    <th>الكمية</th>
                                    <th>المحاسب</th>
                                    <th>ملاحظة</th>
                                    <th>تاريخ التوزيع</th>
                                </tr>
                            </thead>
                            <tbody>

                                <tr>
                                    <?php if(isset($distributions)): ?>
                                        <?php $__currentLoopData = $distributions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $distribution): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <td><span>
                                                    <?php if(isset($distribution->id)): ?>
                                                        <?php echo e($distribution->id); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                            <td><span class="text-nowrap">
                                                    <?php if(isset($distribution->clint->name)): ?>
                                                        <?php echo e($userService->deleteTypeAccount($distribution->clint->name)); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                            <td><span>
                                                    <?php if(isset($distribution->quantity)): ?>
                                                        <?php echo e($distribution->quantity . ' لتر'); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                           
                                                <td><span class="text-nowrap">
                                                    <?php if(isset($distribution->user->name)): ?>
                                                        <?php echo e($userService->deleteTypeAccount($distribution->user->name)); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                                <td><span>
                                                    <?php if(isset($distribution->notice)): ?>
                                                        <?php echo e($distribution->notice); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                                <td><span>
                                                    <?php if(isset($distribution->created_at)): ?>
                                                        <?php echo e(explode(' ',$distribution->created_at)[0]); ?>

                                                    <?php endif; ?>
                                                </span></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!--**********************************Table AllTransaction End***********************************-->
            </div>

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

        <?php $__env->startSection('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('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Nasser\Desktop\petrol_store\resources\views/supplier/supplier_distributions.blade.php ENDPATH**/ ?>