
<?php $__env->startSection('content'); ?>
<form action="<?php echo e(route('report.sales-item-by-branch', $branch_id)); ?>" method="POST">
    <div class="row">
        <div class="col-sm-6">
            <?php echo csrf_field(); ?>
            <div class="row">
                <div class="form-group col-md-4">
                    <label><?php echo e(__('messages.start_date')); ?></label>
                    <input type="text" class="form-control datepickr" name="sdate"
                        value="<?php echo e($sdate); ?>">
                </div>
                <div class="form-group col-md-4 ">
                    <label><?php echo e(__('messages.end_date')); ?></label>
                    <input type="text" class="form-control datepickr" name="edate"
                        value="<?php echo e($edate); ?>">
                </div>
                <div class="col-md-4">
                    <button class="btn btn-primary mt-20" type="submit"> <?php echo e(__('messages.submit')); ?></button>
                </div>
            </div>
        </div>
    </div>
</form>
<div class="row">
    <div class="col-12">
        <hr>
        <br>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <table class="table m-0 MyTable" id="reportExpenseTable">
            <thead>
               <tr>
                 <th>#</th>
                 <th><?php echo e(__('messages.category')); ?></th>
                 <th><?php echo e(__('messages.barcode')); ?></th>
                 <th><?php echo e(__('messages.items')); ?></th>
                 <th><?php echo e(__('messages.stock')); ?></th>
                 <th><?php echo e(__('messages.quantity')); ?></th>
               </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $query; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $itemProperty = 'item'.$branch_id;
                    ?>
                    <tr>
                        <td><?php echo e($loop->iteration); ?></td>
                        <td><?php echo e($rows->$itemProperty?->category?->category_name??'unknown'); ?></td>
                        <td><?php echo e($rows->item_barcode); ?></td>
                        <td><?php echo e($rows->$itemProperty->stk_name??'unknown'); ?></td>
                        <td><?php echo e($rows->$itemProperty->stk_qty??'unknown'); ?></td>
                        <td><?php echo e($rows->item_qty); ?></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            <tfoot>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
                <th>&nbsp;</th>
            </tfoot>
        </table>
    </div>
</div>
<div id="sinvoice-details" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title"><?php echo e(__('messages.invoice')); ?> : <span id="invoice_number"></span></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body" id="sinvoice-mbody">

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo e(__('messages.close')); ?></button>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('customjs'); ?>
    <script src="<?php echo e(asset('custom_js/reports.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.template.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/craftada/iftikhar.appssoul.com/resources/views/admin/report_sales_items_by_branch.blade.php ENDPATH**/ ?>