

<?php $__env->startSection('title'); ?>
    All PO's
<?php $__env->stopSection(); ?>


    



    


<?php $__env->startSection('content'); ?>
<style>
    
    @media  print{
        .td{
            padding: 3px !important;
        }
        .purchased {
            background-color: white !important;
            color: black !important;
            font-weight: bold !important;
        }
        .unpurchased{
            font-weight: lighter !important;
        }
    }

</style>

    <!-- Each sheet element should have the class "sheet" -->
    <!-- "padding-**mm" is optional: you can set 10, 15, 20 or 25 -->
    <?php if($purchases->count()>0): ?>
    <?php $__currentLoopData = $purchases->chunk(30); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $all_purchases): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <section class="sheet padding-10mm" style="">
        
        <center>
            <h1>All Purchase Orders</h1>
            <div style="margin-top: -20px;font-size: 17px">
                <?php echo e(unit_name() ?? app_info()->company_name); ?>

            </div>
        </center>
        <table class="table" align="center" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">
            <thead>
                <tr  class="text-center">
                    <th class="td"> #SL</th>
                    <th class="td"> PO No</th>
                    <th class="td"> PR No</th>
                    <th class="td" width="25%"> Authorized By</th>
                    <th class="td" width="35%"> Date & Time</th>
                    <th class="td"> Ordered Duration </th>
                </tr>
            </thead>
            <tbody>
                <tr style="font-size: 13px" class="text-center">
                    <?php $__currentLoopData = $all_purchases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $purchase): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr id="tr-<?php echo e($purchase->id); ?>">
                            <td class="td"> <?php echo e($key + 1); ?> </td>
                            <td class="td"> <?php echo e($purchase->purchase_no); ?> </td>
                            <td class="td"> <?php echo e($purchase->new_requisition ? $purchase->new_requisition->requisition->requisition_id : null); ?> </td>
                            
                            <td class="td"> <label class="badge badge-success"> <?php echo e($purchase->user? $purchase->user->name :''); ?> </label> </td>
                            <td class="td"> <?php echo e(\Carbon\Carbon::parse($purchase->created_at)->format('d-M-Y -- h:i:s A')); ?> </td>
                            <td class="td"> <?php echo e($purchase->created_at->diffForHumans()); ?> </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tr>
            </tbody>
        </table>
        
        
    </section>

    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <center><a id="print" class="btn-print print-none" onclick="window.print()" >Print</a></center>
    <?php endif; ?>

<?php $__env->stopSection(); ?>
<script type="text/javascript">
    setTimeout(function(){ 
        window.print(); 
    }, 100);
</script>

<?php echo $__env->make('report.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/welluugs/purchase.wellgrouperp.com/resources/views/inventory/purchase/print-po-no.blade.php ENDPATH**/ ?>