

<?php $__env->startSection('title','PO Report'); ?>


    <style>

        @media  print{
            @page{
                size: A4 portrait;
                /*size: legal landscape;*/
                padding: 0 !important;
                margin: 0 !important;
                /*margin-top: 8mm ;!*Disable print Header (url and page number)*!*/
                /*margin-bottom: 8mm ;!*Disable print Footer (url and page number)*!*/

            }
            body {
                zoom:95%; /*or whatever percentage you need, play around with this number*/
                /*font-family: serif;*/
                font-size:20px;
                /*font-weight: bold;*/
                /*background-color: #FFFFFF !important;*/
            }


        }


    </style>



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

  <!-- Each sheet element should have the class "sheet" -->
  <!-- "padding-**mm" is optional: you can set 10, 15, 20 or 25 -->
  <section class="sheet padding-10mm" style="">
    <div id="logo" style="float:right; display: inline;">
      <img src="<?php echo e(asset('logo.png')); ?>" alt="Well Group" height="40" style="border-style: none;">
    </div>
    <center><h1 style="font-weight: lighter; ;margin-left: 10%">PURCHASE ORDER <button onclick="window.open('<?php echo e(url('Inventory/view-requisition-quotation')); ?>/<?php echo e($purchase->requisition_id); ?>','_parent')" class="print-none" type="button" style="font-size: 25px">Edit</button></h1></center>

<table class="table border-bottom-none" align="center" cellpadding="0" cellspacing="0" style=" background: #dEe; padding: 7px; padding-bottom: 13px">
  <tbody style="font-size: 12px">
    <tr>
        <td class="td border-right-none border-bottom-none text-left" style="width: 50%;font-size: 16px">Purchase Order No &nbsp;&nbsp;&nbsp;:&nbsp;&nbsp; <?php echo e($purchase->purchase_no); ?>, C/S No - <?php echo e($purchase->new_requisition->cs_no); ?></td>
        <td class="td border-right-none border-bottom-none text-left" style="width: 50%">Order Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;<?php echo e(dateFormat($purchase->created_at)); ?></td>
    </tr>
    <tr>
        <td class="td border-right-none border-bottom-none text-left" style="width: 50%">Order Reference No&nbsp;&nbsp;:&nbsp;&nbsp;
             PR-<?php echo e($purchase->new_requisition ? $purchase->new_requisition->requisition->requisition_id : null); ?>,
            PR Date: <?php echo e(dateFormat($purchase->new_requisition->requisition->created_at)); ?>

        </td>
        <td class="td border-right-none border-bottom-none text-left" style="width: 50%">Expected Delivery Date&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;<?php echo e(dateFormat($purchase->created_at.'+7 days')); ?></td>
    </tr>

  </tbody>
</table>
<table class="table" align="center" cellpadding="0" cellspacing="0" style="margin-top: -1.2%; background: #dEe; padding: 7px; padding-bottom: 10px">
  <tbody style="font-size: 12px">
     <tr>
        <td class="td  border-bottom-none text-left" style="width: 50%">Supplier: <br>
            <span style="font-size: 18px"> <?php echo e(optional($purchase->details[0]->supplier)->name); ?></span> <br>
            <br><span style="font-size: 14px">Payment Type : <?php echo e($purchase->payment_type == 2 ? 'Cash' : 'Credit'); ?></span><br>
            <?php echo e(optional($purchase->details[0]->supplier)->address); ?><br>
        </td>
        <td class="td border-right-none border-bottom-none text-left" style="width: 50%"> Deliver To: <br>
            <span style="font-size: 18px"><?php echo e(unit_name() ?? app_info()->company_name); ?></span><br><br><?php echo e(auth_unit_address()); ?>

    </tr>

  </tbody>
</table>

<table class="table" align="center" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;">

    <thead>
        <tr style="font-size: 12px;height: 30px; background-color: #e3e1dc;" class="text-center">
            <td style="width: 10%" class="td text-center"> Item Code </td>
            <td style="width: 20%" class="td text-center"> Item Name </td>
             <td style="width: 10%" class="td text-center"> Brand </td>
            <td style="width: 10%" class="td text-center"> Unit </td>
            <td style="width: 10%" class="td text-center"> Quantity </td>
            <td style="width: 10%" class="td text-center"> Unit Price (BDT)</td>
            <td style="width: 10%" class="td text-center">Total Amount (BDT)</td>
      </tr>
    </thead>
    <tbody style="font-size: 12px">
        <?php $i=0; $total=0; ?>

          <?php $__currentLoopData = $purchase->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $productKey => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

          <?php $total+= $product['qty'] * $product['price']; ?>
            <tr>
              <td class="td text-center"><?php echo e(optional($product->product)->item_code); ?></td>
              <td class="td text-left"><?php echo e(optional($product->product)->name); ?></td>
              <td class="td text-center"><?php echo e(optional(optional($product->product)->brand)->name); ?></td>
              <td class="td text-center"><?php echo e(optional(optional($product->product)->unit)->name); ?></td>
              <td class="td text-right"><?php echo e(number_format($product['qty'], 2)); ?></td>
              <td class="td text-right"><?php echo e(number_format($product['price'], 3)); ?> </td>
              <td class="td text-right"><?php echo e(number_format($product['qty'] * $product['price'],2)); ?> </td>
            </tr>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


        <tr>
            <td class="td" colspan="5"></td>
            <td class="td text-right"> Total</td>
            <td class="td text-right"> <?php echo e(number_format($total,2)); ?> </td>
        </tr>
    </tbody>
</table>
<div style="font-size: 12px">
  
</div>

<div style="margin-top: 250px" class="signature">
    <table class=" table"  align="center" cellpadding="0" cellspacing="0" style="width: 100%;border:none; float:left;">
      <tr>
        <td style="border-top: 1px solid black;width: 20%;text-align: center;font-size: 12px; margin-top:30px;" ><br>Prepare By</td>
        <td style="width: 20%;border:none;"></td>
        <td style="border-top: 1px solid black;width: 20%;text-align: center;font-size: 12px; margin-top:30px;" ><br> Purchase Officer</td>
        <td style="width: 20%;border:none;"></td>
        <td style="border-top: 1px solid black;width: 20%;text-align: center;font-size: 12px"><br>Head Of the Dept.</td>
        <td style="width: 20%;border:none;"></td>
        
      </tr>
    </table>
</div>

<center><a id="print" class="btn-print print-none" onclick="window.print()" >Print</a></center>
</section>

<?php $__env->stopSection(); ?>

<?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-purchase-order.blade.php ENDPATH**/ ?>