<!DOCTYPE html>
<html>
<head>
    <title>Invoice #<?php echo e($order->id); ?></title>

    <style>
        body{
            font-family: Arial, sans-serif;
            padding:20px;
        }

        table{
            width:100%;
            border-collapse:collapse;
        }

        table th,
        table td{
            border:1px solid #ddd;
            padding:8px;
        }

        .text-right{
            text-align:right;
        }

        @media print{
            .no-print{
                display:none;
            }
        }
    </style>
</head>
<body>

    <button class="no-print" onclick="window.print()">
        Print Invoice
    </button>

    <h2>Invoice #<?php echo e($order->id); ?></h2>

    <hr>

    <h4>Customer Information</h4>

    <div class="col-md-6">

    <div class="card-body">
                    

                    <p><strong><?php echo e($order->shipping_address['name'] ?? ''); ?></strong></p>
                    <p><?php echo e($order->shipping_address['address'] ?? ''); ?></p>
                    <p><?php echo e($order->shipping_address['city'] ?? ''); ?>, <?php echo e($order->shipping_address['state'] ?? ''); ?></p>
                    <p><?php echo e($order->shipping_address['country'] ?? ''); ?> - <?php echo e($order->shipping_address['postal_code'] ?? ''); ?></p>
                    <p><strong>Phone:</strong> <?php echo e($order->shipping_address['phone'] ?? ''); ?></p>
   </div>
</div>
    <div class="col-md-4">
    <div style="text-align:center; margin:20px 0;">
       <h4>Scan to Verify Order</h4>

       <img src="data:image/png;base64,<?php echo e($qrImage); ?>" 
         alt="QR Code"
         style="width:150px; height:150px;">
    </div>
</div>

    <table>
        <thead>
            <tr>
                <th>Product</th>
                <th>Price</th>
                <th>Qty</th>
                <th>Total</th>
            </tr>
        </thead>

        <tbody>

        <?php $grandTotal = 0; ?>

        <?php $__currentLoopData = $order->orderDetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

            <?php
                $total = $item->price * $item->quantity;
                $grandTotal += $total;
            ?>

            <tr>
                <td><?php echo e($item->product->name ?? ''); ?></td>
                <td><?php echo e($item->price); ?></td>
                <td><?php echo e($item->quantity); ?></td>
                <td><?php echo e($total); ?></td>
            </tr>

        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

        </tbody>

        <tfoot>
            <tr>
                <th colspan="3" class="text-right">
                    Grand Total
                </th>

                <th>
                    <?php echo e($grandTotal); ?>

                </th>
            </tr>
        </tfoot>
    </table>

    <script>
        window.onload = function() {
            window.print();
        }
    </script>

</body>
</html><?php /**PATH C:\wamp64\www\ecommerce\resources\views/admin/partials/order/printOrder.blade.php ENDPATH**/ ?>