

<?php $__env->startSection('content'); ?>
<!-- Content wrapper scroll start -->
<div class="content-wrapper-scroll">

<!-- Content wrapper start -->
<div class="content-wrapper">

<div>
    <h5><strong>SALES REPORT  FOR </strong> - <?php echo e(request()->branch); ?> | Category Type: <?php echo e(request()->category); ?>, Date: <?php echo e(request()->date); ?></h5>
</div>

        <!-- Row start -->
        <div class="row gutters">
            <div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12">
                <div class="stats-tile">
                    <div class="sale-icon">
                        <i class="icon-shopping-bag1"></i>
                    </div>
                    <div class="sale-details">
                        <h2><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($branch_total_general - $deliveriesToday, 2); ?></h2>
                        <p><strong>Net Sales</strong></p>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12">
                <div class="stats-tile">
                    <div class="sale-icon">
                        <i class="icon-shopping-bag1"></i>
                    </div>
                    <div class="sale-details">
                        <h2><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($branch_total_house, 2); ?></h2>
                        <p><a href="">On the House</a></p>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
                <div class="stats-tile">
                    <div class="sale-icon">
                        <i class="icon-check-circle"></i>
                    </div>
                    <div class="sale-details">
                        <h2><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($branch_total_reject, 2); ?></h2>
                        <p><a href="#">Rejected Items</a></p>
                    </div>
                </div>
            </div>
        </div>



        
    <!-- Row start -->
    <div class="row gutters">
    <div class="col-xl-6 col-lg-6 col-md-12 col-sm-12 col-12">
            <div class="card h-180">
                
                <div class="card-header">
                    <form action="<?php echo e(route('departmentSummaryDate')); ?>" method="get">
                        <?php echo csrf_field(); ?>
                        <input type="text"  name="date" value="<?php echo e(request()->date); ?>" readonly hidden>
                        <input type="text"  name="category" value="<?php echo e(request()->category); ?>" readonly hidden>
                        <input type="text"  name="branch" value="<?php echo e(request()->branch); ?>" readonly hidden>
                        <button class="btn btn-outline-primary rounded-pill">Category Report</button>
                    </form>
                    <form action="<?php echo e(route('itemSummaryDate')); ?>" method="get">
                        <?php echo csrf_field(); ?>
                        <input type="text"  name="date" value="<?php echo e(request()->date); ?>" readonly hidden>
                        <input type="text"  name="category" value="<?php echo e(request()->category); ?>" readonly hidden>
                        <input type="text"  name="branch" value="<?php echo e(request()->branch); ?>" readonly hidden>
                        <button class="btn btn-outline-primary rounded-pill">Product Report</button>
                    </form>
                    <hr>
                </div>
                
                <div class="card-body">
                    <div class="create-offer-container">
                    <div class="card-title">
                        SUMMARY
                    </div>
                    <?php echo $__env->make('inc.report-summary-salesperson', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xl-2 col-lg-2 col-md-4 col-sm-4 col-6">
            <div class="social-tile h-180">
                <p>Discounts</p>
                <h3><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($discounts, 2); ?></h3>
                <a href="#" class="btn btn-outline-primary rounded-pill" data-bs-toggle="modal" data-bs-target="#exampleModalFullScreen">view</a>
            </div>
        </div>

       <?php if(request()->category == "Delivery"): ?>
        <div class="col-xl-2 col-lg-2 col-md-4 col-sm-4 col-6">
            <div class="social-tile h-180">
                <p>Total Delivery Fees</p>
                <h3><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($deliveriesToday, 2); ?></h3>
            </div>
        </div>
       <?php endif; ?>
        <div class="col-xl-2 col-lg-2 col-md-4 col-sm-4 col-12">
            <div class="social-tile h-180">
                <p><strong>Expected Amount</strong></p>
                <h3><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($orders, 2); ?></h3>
            </div>
        </div>
    </div>
    <!-- Row end -->

    <!-- Row start -->
    <div class="row gutters">
        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
                <div class="card-body">
                    
                    <div class="table-responsive">
                    <table id="copy-print-csv" class="table v-middle">
                                <thead>
                                    <tr>
                                        <th>Order No.</th>
                                        <th>Ordered Date</th>
                                        <th>Product</th>
                                        <th>Quantity</th>												
                                        <th> Unit Price</th>
                                        <th>Category</th>
                                        <th>Total Price</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $sales_today_branch; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>#<?php echo e($list->invoice_number); ?></td>
                                        <td><?php echo e($list->created_at); ?></td>
                                        <td>
                                        <?php echo e($list->invoice_product_name); ?>

                                        </td>
                                        <td>
                                            <?php echo e($list->invoice_quantity); ?>

                                        </td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_unit_price); ?></td>
                                        <td><?php echo e($list->invoice_category); ?></td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_total_price); ?></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                    </div>

                </div>
            </div>

        </div>
    </div>
    <!-- Row end -->




    <!-- on the house sales and rejected orders -->

        <!-- Row start -->
        <div class="row gutters">
        <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">

            <!-- Card start -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">On the House</div>
                </div>
                <div class="card-body">
                    
                    <!-- Row start -->
                    <div class="row gutters">
                        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">        
                        <table                         id="apiCallbacks" class="table custom-table">

                                <thead>
                                    <tr>
                                        <th>Product</th>
                                        <th>Quantity</th>												
                                        <th> Unit Price</th>
                                        <th>Total Price</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $branch_total_house_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>
                                        <?php echo e($list->invoice_product_name); ?>

                                        </td>
                                        <td>
                                            <?php echo e($list->invoice_quantity); ?>

                                        </td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_unit_price); ?></td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_total_price); ?></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>

                        </div>
                    </div>
                    <!-- Row end -->

                </div>
            </div>
            <!-- Card end -->

        </div>
        <div class="col-xl-6 col-lg-6 col-md-6 col-sm-6 col-12">

            <!-- Card start -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">Rejected Order</div>
                </div>
                <div class="card-body">
                    
                    <!-- Row start -->
                    <div class="row gutters">
                    <div class="table-responsive">
                        <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <table id="fixedHeader" class="table custom-table">
                                <thead>
                                    <tr>
                                        <th>Order No.</th>
                                        <th>Product</th>
                                        <th>Quantity</th>												
                                        <th> Unit Price</th>
                                        <th>Total Price</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $branch_total_reject_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>#<?php echo e($list->invoice_number); ?></td>
                                        <td>
                                        <?php echo e($list->invoice_product_name); ?>

                                        </td>
                                        <td>
                                            <?php echo e($list->invoice_quantity); ?>

                                        </td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_unit_price); ?></td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->invoice_total_price); ?></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                           
                        </div>
                    </div>
                    <!-- Row end -->

                </div>
            </div>
            <!-- Card end -->

        </div>
    </div>
    <!-- Row end -->


    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <!-- Card start -->
            <div class="card">
                <div class="card-header">
                    <div class="card-title">Invoice List</div>
                </div>
                <div class="card-body">
                    
                    <!-- Row start -->
                    <div class="row gutters">
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                            
                        <table id="scrollVertical" class="table custom-table">
                                <thead>
                                    <tr>
                                        <th>Invoice No.</th>
                                        <th>Order Cost</th>
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $order; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>#<?php echo e($list->order_id); ?></td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->total_cost_order); ?></td>
                                        <td><a href="<?php echo e(route('orderTransaction',$list->order_id)); ?>">view Transaction</a></td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                           
                        
                    </div>
                    <!-- Row end -->

                </div>
            </div>
            <!-- Card end -->

        </div>
    </div>
    <!-- Row end -->

</div>
</div>
</div>
<!-- Content wrapper end -->

<!-- Modal for Discount Orders -->
<?php echo $__env->make('inc.discount-items', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/morttsons/public_html/morttsonsposfiles/resources/views/sales/sales-person-category-with-item.blade.php ENDPATH**/ ?>