

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

<!-- Content wrapper start -->
<div class="content-wrapper">
<div style="padding:15px">
    <h4>REPORT FROM <?php echo e(Request()->date); ?></h4>
</div>
<div class="container">
  <div class="row">
    <div class="col-sm">
      <!-- Field wrapper start -->
      <div class="field-wrapper">
            <input class="form-control" readonly type="text" placeholder="Full Name" value="<?php echo e($user_data -> name); ?>">
            <div class="field-placeholder">Name <span class="text-danger">*</span></div>
        </div>
        <!-- Field wrapper end -->
    </div>
    <div class="col-sm">
           <!-- Field wrapper start -->
           <div class="field-wrapper">
            <input class="form-control" readonly type="text" value="<?= $user_data -> sales_person_category . " Service" ?>">
            <div class="field-placeholder">Sales Category <span class="text-danger">*</span></div>
        </div>
        <!-- Field wrapper end -->
    </div>
    <div class="col-sm">
           <!-- Field wrapper start -->
           <div class="field-wrapper">
            <input class="form-control" type="text" value="<?php echo e($user_data -> branch); ?>" readonly>
            <div class="field-placeholder">Current Branch<span class="text-danger">*</span></div>
        </div>
        <!-- Field wrapper end -->
    </div>
  </div>
</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>
                    <?php if($user_data -> sales_person_category == "Delivery"): ?>
                    <div class="sale-details">
                        <h2><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($general_total_general - $deliveryAmount, 2); ?></h2>
                        <p><strong>Net Sales</strong></p>
                    </div>
                    <?php else: ?>
                    <div class="sale-details">
                        <h2><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($general_total_general, 2); ?></h2>
                        <p><strong>Net Sales</strong></p>
                    </div>
                    <?php endif; ?>
                </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($general_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($general_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-12 col-lg-12 col-md-12 col-sm-12 col-12">
            
            <div class="card">
            <div class="card-header">
                <form action="<?php echo e(route('departmentSummarybyDate')); ?>" method="get">
                    <input type="text" name="date" value="<?php echo e(request()->date); ?>" readonly hidden>
                    <input type="text" name="user_id" value="<?php echo e($user_data->id); ?>" readonly hidden>
                    <button class="btn btn-outline-primary rounded-pill" type="submit">Category Report</button>
                </form>
                <form action="<?php echo e(route('ItemSummarybyDate')); ?>" method="get">
                    <input type="text" name="date" value="<?php echo e(request()->date); ?>" readonly hidden>
                    <input type="text" name="user_id" value="<?php echo e($user_data->id); ?>" readonly hidden>
                    <button class="btn btn-outline-primary rounded-pill" type="submit">Product Report</button>
                </form>
            </div>
                <div class="card-body">
                    <div class="card-title">Transactions</div>
                    <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>Department</th>
                                        <th>Total Price</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $sales_today_general; $__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">No Charge Items</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 = $general_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 Items</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">
                        <div class="table-responsive">
                        <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 = $general_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>
        <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">Orders</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="hideSearchExample" class="table custom-table">
                                <thead>
                                    <tr>
                                        <th>Order No.</th>
                                        <th>Outlet</th>
                                        <th>Total 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($list->branch); ?></td>
                                        <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo e($list->total_cost_order); ?></td>
                                        <td><a class="text-primary" style="text-decoration:underline" href="<?php echo e(route('orderTransaction', $list->order_id)); ?>">view</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 -->




<?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/general-sales-report-byuser.blade.php ENDPATH**/ ?>