<?php $__env->startSection('title', $transaction->invoice_no.' - '.trans('transaction.invoice_print')); ?>

<?php $__env->startSection('style'); ?>
<style>
    table.receipt-table {
        width: 310px;
        border-collapse: collapse;
    }
    table.receipt-table th {
        padding: 5px 0;
    }
    table.receipt-table td {
        padding: 3px 0;
    }
</style>
<?php $__env->stopSection(); ?>

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

<table class="receipt-table">
    <tbody>
        <tr><td colspan="3"><h2 class="text-center"><?php echo e(config('store.name')); ?></h2></td></tr>
        <tr>
            <td colspan="3">
                <p class="text-center"><?php echo e(config('store.address')); ?> | Telp: <?php echo e(config('store.phone')); ?></p>
            </td>
        </tr>
        <tr>
            <td style="width:90px"><?php echo e(trans('transaction.invoice_no')); ?></td>
            <td class="strong">: <?php echo e($transaction->invoice_no); ?></td>
            <td class="text-right"><?php echo e($transaction->created_at->format('d/m/Y')); ?></td>
        </tr>
        <tr>
            <td><?php echo e(trans('transaction.cashier')); ?></td>
            <td>: <?php echo e($transaction->user->name); ?></td>
            <td class="text-right"><?php echo e($transaction->created_at->format('H:i:s')); ?></td>
        </tr>
        <tr><td><?php echo e(trans('transaction.customer')); ?></td><td colspan="2">: <?php echo e($transaction->customer['name']); ?></td></tr>
        <tr><td><?php echo e(trans('transaction.customer_phone')); ?></td><td colspan="2">: <?php echo e($transaction->customer['phone']); ?></td></tr>
        <tr><th colspan="3" class="text-left"><?php echo e(trans('transaction.items')); ?></th></tr>
        <tr>
            <th class="border-bottom"><?php echo e(trans('product.item_qty')); ?></th>
            <th class="text-right border-bottom"><?php echo e(trans('product.price')); ?> (<?php echo e(trans('product.item_discount')); ?>)</th>
            <th class="text-right border-bottom" style="width:90px"><?php echo e(trans('product.item_subtotal')); ?></th>
        </tr>
        <?php $discountTotal = 0; ?>
        <?php $__currentLoopData = $transaction->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <td class="strong" colspan="3"><?php echo e($key + 1); ?>)&nbsp;<?php echo e($item['name']); ?> (<?php echo e($item['unit']); ?>)</td>
        </tr>
        <tr>
            <td class="text-center border-bottom" style="vertical-align: top;"><?php echo e($item['qty']); ?></td>
            <td class="text-right border-bottom">
                <?php echo e(format_rp($item['price'])); ?> (<?php echo e(format_rp($item['item_discount'])); ?>)
            </td>
            <td class="text-right border-bottom"><?php echo e(format_rp($item['subtotal'])); ?></td>
        </tr>
        <?php $discountTotal += $item['item_discount_subtotal'] ?>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <th colspan="2" class="text-right"><?php echo e(trans('transaction.subtotal')); ?> :</th>
            <th class="text-right"><?php echo e(format_rp($transaction['total'] + $discountTotal)); ?></th>
        </tr>
        <tr>
            <th colspan="2" class="text-right"><?php echo e(trans('transaction.discount_total')); ?> :</th>
            <th class="text-right"><?php echo e(format_rp($discountTotal)); ?></th>
        </tr>
        <tr>
            <th colspan="2" class="text-right"><?php echo e(trans('transaction.total')); ?> :</th>
            <th class="text-right"><?php echo e(format_rp($transaction['total'])); ?></th>
        </tr>
        <tr>
            <th colspan="2" class="text-right"><?php echo e(trans('transaction.payment')); ?> :</th>
            <th class="text-right"><?php echo e(format_rp($transaction->payment)); ?></th>
        </tr>
        <tr>
            <th colspan="2" class="text-right"><?php echo e(trans('transaction.exchange')); ?> :</th>
            <th class="text-right"><?php echo e(format_rp($transaction->getExchange())); ?></th>
        </tr>
    </tbody>
</table>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.pdf', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\Deni\Downloads\Compressed\Apotek candilkuya\grosir-obat-master\resources\views/transactions/receipt.blade.php ENDPATH**/ ?>