

<?php $__env->startSection('title','Requisition Inventory'); ?>
<?php $__env->startSection('style'); ?>
    <style>
        @media  print {
            @page  {
                size: A4
                 landscape
            }
            .purchasePrint {
                display: none;
            }
            body{
                padding: 10px;
            }
        }
    </style>
    <!-- DataTables -->
    <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables/dataTables.bootstrap4.css')); ?>">
<?php $__env->stopSection(); ?>

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

    <!-- Content Header (Page header) -->

    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <!-- Main content -->
                    <div class="invoice p-3 mb-3">
                        <!-- title row -->
                        <div class="row">
                            <div class="col-12">
                                <address style="text-align:center">
                                    <h1><?php echo e(unit_name() ?? app_info()->company_name); ?></h1>
                                    <h3>Industrial estate</h3>
                                    <h3>Chittagong</h3>
                                </address>
                                
                            </div>
                            <!-- /.col -->
                        </div>
                        <!-- info row -->
                        <div class="row">
                            <div width="50%" style="float:left">
                                Bill For
                                <address>
                                    <strong> <?php echo e(optional(optional($purchase)->supplier)->name); ?> </strong><br>
                                    Address: <?php echo e(optional(optional($purchase)->supplier)->address); ?><br>
                                    Phone:  <?php echo e(optional(optional($purchase)->supplier)->phone); ?><br>
                                    Email: <?php echo e(optional(optional($purchase)->supplier)->email ?? "N/A"); ?>

                                </address>
                            </div>
                            <!-- /.col -->
                            <div width="50%"  style="float:right">
                                From
                                <address>
                                    <strong><?php echo e(unit_name() ?? app_info()->company_name); ?></strong><br>
                                    Bscic Industrial estate,<br>
                                    Kalurghat,Chittagong<br>
                                    Phone: +8801810-101010<br>
                                    Email: support@wellbd.com
                                </address>
                            </div>
                            <br>
                            <!-- /.col -->
                        </div>
                        <!-- /.row -->
                        <div class="row invoice-col" style="clear:both">
                        
                         <br><br>
                         <span style="float:left"><b>Order No :</b> <?php echo e($purchase->id); ?></span>
                         <span style="float:right"><b>Order Date :</b> <?php echo e(\Carbon\Carbon::parse($purchase->created_at)->format('d-M-Y')); ?></span><br>
                     </div><br>
                     <!-- /.col -->
                        <!-- Table row -->
                        <div class="row">
                            <div class="col-12 table-responsive">
                                <table class="table table-striped table_border_print" border="1" cellspacing=0 cellpadding=5 width=100%>
                                    <thead>
                                        <tr>
                                            <th>Serial #</th>
                                            <th>Item Code</th>
                                            <th>Product / Item Name</th>
                                            <th>Unit </th>
                                            <th>Price </th>
                                            <th>Qty</th>
                                            <th>Subtotal</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $i=0; $total=0; ?>
                                        <?php $__currentLoopData = $purchase->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php $total+=$product->price * $product->qty; ?>
                                            <tr>
                                                <td style="text-align: center"> <?php echo e(++$i); ?> </td>
                                                <td style="text-align: center"> <?php echo e(optional($product->product)->item_code); ?> </td>
                                                <td> <?php echo e(optional($product->product)->name); ?> </td>
                                                <td style="text-align: center"> <?php echo e(optional($product->product_unit)->name); ?> </td>
                                                <td style="text-align: right"> <?php echo e(number_format($product->price,2)); ?> Tk</td>
                                                <td style="text-align: right"> <?php echo e(number_format($product->qty,2)); ?> </td>
                                                <td style="text-align: right"> <?php echo e(number_format($product->price * $product->qty,2)); ?> Tk</td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.col -->
                        </div>
                        <!-- /.row -->

                        <div class="row">
                            <!-- accepted payments column -->
                            
                            <!-- /.col -->
                            <div class="col-lg-12">
                                <div class="table-responsive">
                                    <table class="table" width="100%">
                                        <tr>
                                            <th width="80%">
                                                
                                                <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
                                                    <span style="float:left" class="text-left"> Note : </span><?php echo e($purchase->note); ?>

                                                </p>
                                            </th>
                                            <td  width="20%"><span style="float:right"><strong>Total:</strong> <?php echo e(number_format($total,2)); ?> TK</span></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <!-- /.col -->
                        </div>
                        <!-- /.row -->
                    </div>
                    <!-- /.invoice -->
                </div><!-- /.col -->
            </div><!-- /.row -->
            <a href="#" target="_self" onclick="window.print()" class="btn btn-primary purchasePrint"> Print Purchase Order</a>
        </div><!-- /.container-fluid -->
    </section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('plugin'); ?>
    <!-- DataTables -->
    <script src="<?php echo e(asset('plugins/datatables/jquery.dataTables.js')); ?>"></script>
    <script src="<?php echo e(asset('plugins/datatables/dataTables.bootstrap4.js')); ?>"></script>
<?php $__env->stopSection(); ?>

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

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