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

<?php $__env->startSection('content'); ?>
<div class="pull-right">
    <?php echo e(link_to_route('transactions.pdf', trans('transaction.invoice_pdf'), [$transaction->invoice_no], ['class' => 'btn btn-default'])); ?>

    <?php echo e(link_to_route('transactions.receipt', trans('transaction.invoice_print'), [$transaction->invoice_no], ['class' => 'btn btn-default'])); ?>

</div>
<h3 class="page-header"><?php echo e($transaction->invoice_no); ?> <small><?php echo e(trans('transaction.detail')); ?></small></h3>
<div class="row">
    <div class="col-sm-4">
        <div class="panel panel-default">
            <div class="panel-heading"><h3 class="panel-title"><?php echo e(trans('transaction.detail')); ?></h3></div>
            <div class="panel-body">
                <table class="table table-condensed">
                    <tbody>
                        <tr><td><?php echo e(trans('transaction.invoice_no')); ?></td><td class="text-primary strong"><?php echo e($transaction->invoice_no); ?></td></tr>
                        <tr><td><?php echo e(trans('app.date')); ?></td><td><?php echo e($transaction->created_at->format('Y-m-d')); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.customer_name')); ?></td><td><?php echo e($transaction->customer['name']); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.customer_phone')); ?></td><td><?php echo e($transaction->customer['phone']); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.items_count')); ?></td><td><?php echo e($transaction->items_count); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.total')); ?></td><td class="text-right strong"><?php echo e(format_rp($transaction->total)); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.payment')); ?></td><td class="text-right"><?php echo e(format_rp($transaction->payment)); ?></td></tr>
                        <tr><td><?php echo e(trans('transaction.exchange')); ?></td><td class="text-right"><?php echo e(format_rp($transaction->getExchange())); ?></td></tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="col-sm-8">
    <div class="panel panel-default">
        <div class="panel-heading"><h3 class="panel-title"><?php echo e(trans('transaction.items')); ?></h3></div>
        <div class="panel-body">
            <table class="table table-condensed">
            <thead>
                <tr>
                    <th><?php echo e(trans('app.table_no')); ?></th>
                    <th><?php echo e(trans('product.name')); ?></th>
                    <th class="text-right"><?php echo e(trans('product.item_price')); ?></th>
                    <th class="text-right"><?php echo e(trans('product.item_discount')); ?></th>
                    <th class="text-center"><?php echo e(trans('product.item_qty')); ?></th>
                    <th class="text-right"><?php echo e(trans('product.item_subtotal')); ?></th>
                </tr>
            </thead>
            <tbody>
            <?php $discountTotal = 0; ?>
            <?php $__currentLoopData = $transaction->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($key + 1); ?></td>
                    <td>
                        <?php echo e($item['name']); ?> <br>
                        <small class="text-primary">(<?php echo e($item['unit']); ?>)</small>
                    </td>
                    <td class="text-right"><?php echo e(format_rp($item['price'])); ?></td>
                    <td class="text-right"><?php echo e(format_rp($item['item_discount'])); ?></td>
                    <td class="text-center"><?php echo e($item['qty']); ?></td>
                    <td class="text-right"><?php echo e(format_rp($item['subtotal'])); ?></td>
                </tr>
                <?php $discountTotal += $item['item_discount_subtotal'] ?>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
            <tfoot>
                <tr>
                    <th colspan="5" 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="5" 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="5" class="text-right"><?php echo e(trans('transaction.total')); ?> :</th>
                    <th class="text-right"><?php echo e(format_rp($transaction['total'])); ?></th>
                </tr>
            </tfoot>
        </table>
        </div>
    </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \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/show.blade.php ENDPATH**/ ?>