
<?php $__env->startSection('title'); ?> Sell | Beauty Parlour <?php $__env->stopSection(); ?>
<?php $__env->startSection('sell'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('sell.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content_section'); ?>
<div class="row py-3 ps-2">
    <div class="heading d-flex justify-content-start align-items-center">
        <h3 class="mb-0"><span> Sell List</span></h3>
    </div>
</div>

<div class="table_wrapper py-1 card">
    <div class="row my-2 aggregate-section-div">
        <div class="px-3 ">
            <div class=" d-flex justify-content-between align-items-center aggregate-section border">
                <div class="d-flex align-items-center">
                    <p class="mb-0"><a href="<?php echo e(route('sell.index')); ?>"
                            class="text-primary py-2 px-3 active">All(<?php echo e($allSellCount); ?>)</a>
                    </p>

                    <p class="mb-0"><a href="<?php echo e(route('pending-sell-list')); ?>" class="text-primary py-2 px-3">Pending
                            (<?php echo e($pendingSellCount); ?>)</a></p>
                </div>
                <div class="d-sm-block">
                    <?php if(Auth::user()->can('sell-create')): ?>
                    <a href="<?php echo e(route('sell.create')); ?>"
                        class="btn btn-success rounded-0 d-flex align-items-center px-2 border-0">
                            <i class=" fa fa-plus pr-2"></i>
                            <span class="px-2">New Sell</span>
                        </a>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>



    <div class="row px-3">
        <div class="table-responsive">
            <table id="sellTable" class="table table-bordered w-100">
                <thead class="text-uppercase">
                    <tr class="me-3">
                        <th class="text-center" scope="col"><span>Serial</span></th>
                        <th class="text-center" scope="col"><span>Invoice ID</span></th>
                        <th class="text-center" scope="col"><span>Client</span></th>
                        <th class="text-center" scope="col"><span>Created</span></th>
                        <th class="text-center" scope="col"><span>Status</span></th>
                    </tr>
                </thead>
                <tbody>

                    <?php $__currentLoopData = $sellData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php if(isset($item) && $item != null): ?>
                    <tr class="text-center">
                        <td class="text-center">
                            <b><?php echo e($key+1); ?></b>
                        </td>
                        <td class="text-center">
                            <div class="row_title">
                                <b>#<?php echo e($item->selling_id); ?></b>
                            </div>
                            <div class="row-actions mt-2">

                                <?php if(Auth::user()->can('sell-edit')): ?>
                                <span><a class="fw-bolder text-info"
                                        href="<?php echo e(route('selling-invoice', $item->id)); ?>">Invoice View</a>
                                </span>
                                <?php endif; ?>

                            </div>
                        </td>
                        <td class="text-center">
                            <a href="<?php echo e(route('client-profile',$item->clientData->id)); ?>"
                                class="text-primary fw-bolder text-decoration-underline">
                                <?php echo e($item->clientData->client_name); ?>

                            </a>
                        </td>
                        <td class="text-start">
                            <b>Date:
                            </b><?php echo e(Carbon\Carbon::createFromFormat('Y-m-d', $item->created_at->toDateString())->format('d-m-Y')); ?>

                            <br>
                            <b>Time: </b><?php echo e(Carbon\Carbon::create($item->created_at->toTimeString())->format('h:i')); ?>

                        </td>
                        <td>
                            <?php if($item->is_bill_pay == true): ?>
                            <span class="badge custom-bg-green">Paid</span>
                            <?php else: ?>
                            <span class="badge bg-warning">Unpaid</span>
                            <?php endif; ?>
                        </td>
                    </tr>

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


                </tbody>
            </table>
        </div>
    </div>
</div>

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

<?php $__env->startSection('scripts'); ?>

<script>
    $(document).ready(function(){
        $(document).ready(function(){
            $('#sellTable').DataTable({
                scrollX: true,
            });
        });
    });

    $(document).ready(function(){
        $("#expense_category_id").select2({
            dropdownParent: $('#addExpense')
        })
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\skin-care\resources\views/admin/productManage/sellProduct/index.blade.php ENDPATH**/ ?>