

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


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

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

    <!-- 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">Product Information</div>
                </div>
                <div class="card-body">
                <ul class="customer-rating">
                    <li class="clearfix">
                        <div class="customer">
                            <img src="/uploads/<?php echo e(empty($product->product_image) ? 'no-product.png' : $product->product_image); ?>" alt="product">
                        </div>
                        <?php $user_cre = \DB::table('users')->where('id', $product->user_id)->first(); ?>
                        <div class="customer-review">
                            <div class="stars" id="rate2"></div>
                            <h5><?php echo e($product->invoice_product_name); ?></h5>
                            <h6 class="by">By, <a href="#"><?php echo e($user_cre->name); ?></a></h6>
                            <p>Transaction: <?php echo e($product->invoice_number); ?></p>
                            <p>Outlet: <?php echo e($product->branch); ?></p>
                            <p>Quantity: <?php echo number_format($product->invoice_quantity, 2); ?></p>
                        </div>
                    </li>
                </ul>
                </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">Item BOM</div>
                </div>
                <div class="card-body">
                <div class="table-responsive">
                <table class="table table-bordered v-middle m-0">
                            <thead>
                                <tr>
                                    <th>Item Name</th>
                                    <th>Unit</th>
                                    <th>Cost</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <?php $__currentLoopData = $p_comp; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($comp->product_name); ?></td>
                                <td><?php echo e((float)$comp->unit_measure * $product->invoice_quantity); ?></td>
                                <td><?php echo e(empty($app->currency) ? "GHS" : $app->currency); ?><?php echo number_format($comp->cost * $product->invoice_quantity, 2); ?></td>
                                <td>
                                    <form action="<?php echo e(route('ReverseProductComposition')); ?>" method="get">
                                        <input type="text" name="quantity" hidden value="<?php echo e($product->invoice_quantity * $comp->unit_measure); ?>">
                                        <input type="text" name="comp_id" hidden value="<?php echo e($comp->composition_id); ?>">
                                        <input type="text" name="branch" hidden value="<?php echo e($product->branch); ?>">
                                        <input type="text" name="product_id" hidden value="<?php echo e($product->product_id); ?>">
                                        <input type="text" name="date" hidden value="<?php echo e($product->created_at); ?>">
                                        <input type="submit" class="btn btn-outline-primary rounded-pill rounded btn-sm" name="type" value="Returned Item">
                                    </form>

                                    <form action="<?php echo e(route('ReverseProductComposition')); ?>" method="get">
                                        <input type="text" name="quantity" hidden value="<?php echo e($product->invoice_quantity * $comp->unit_measure); ?>">
                                        <input type="text" name="comp_id" hidden value="<?php echo e($comp->composition_id); ?>">
                                        <input type="text" name="product_id" hidden value="<?php echo e($product->product_id); ?>">
                                        <input type="text" name="branch" hidden value="<?php echo e($product->branch); ?>">
                                        <input type="text" name="date" hidden value="<?php echo e($product->created_at); ?>">
                                        <input type="submit" class="btn btn-outline-primary rounded-pill rounded btn-sm mt-2" value="Wastage" name="type">  
                                    </form>

                                    <form action="<?php echo e(route('ReverseProductComposition')); ?>" method="get">
                                        <input type="text" name="quantity" hidden value="<?php echo e($product->invoice_quantity * $comp->unit_measure); ?>">
                                        <input type="text" name="comp_id" hidden value="<?php echo e($comp->composition_id); ?>">
                                        <input type="text" name="product_id" hidden value="<?php echo e($product->product_id); ?>">
                                        <input type="text" name="branch" hidden value="<?php echo e($product->branch); ?>">
                                        <input type="text" name="date" hidden value="<?php echo e($product->created_at); ?>">
                                        <input type="submit" class="btn btn-outline-primary rounded-pill rounded btn-sm mt-2" value="Restore BOM" name="type">  
                                    </form>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </table>
                </div>
                </div>
            </div>
            <!-- Card end -->

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

</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 /home2/morttacy/morttsonsposfiles/resources/views/inc/rejected-order-bom.blade.php ENDPATH**/ ?>