<?php $__env->startSection('content'); ?>
    <div class="report-transactions-vat">
        <?php if($transactions && count($transactions)): ?>
            <div>
                <h4><?php echo ucfirst($businessName); ?></h4>
            </div>

            <div>
                <h2>Transactions list (VAT)</h2>
                <h5>
                    From: <?php echo Helper::formatDate($param['from']); ?> - To: <?php echo Helper::formatDate($param['to']); ?>

                </h5>
            </div>

            <table class="table">
                <thead>
                <tr>
                    <th>Date</th>
                    <th>Record type</th>
                    <th>Name</th>
                    <th>VAT</th>
                    <th>Reference</th>
                    <th>Note</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($transactions as $transaction): ?>
                    <tr>
                        <td><?php echo Helper::formatDate($transaction->date); ?></td>
                        <td><?php echo $transaction->record_type->description; ?></td>
                        <td><?php echo $transaction->name; ?></td>
                        <td class="text-right"><?php echo Helper::formatAmount($transaction->vat); ?></td>
                        <td><?php echo $transaction->reference; ?></td>
                        <td><?php echo $transaction->note; ?></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
                <tfoot>
                <tr>
                    <th colspan="3">Total</th>
                    <th class="text-right"><?php echo Helper::formatAmount(Helper::calculateTotal($transactions)); ?></th>
                    <th colspan="2"></th>
                </tr>
                </tfoot>
            </table>
        <?php else: ?>
            <div>
                <h4><?php echo ucfirst($businessName); ?></h4>
            </div>

            <div>
                <h2>Transactions list (VAT)</h2>
                <h5 class="m-b">
                    From: <?php echo Helper::formatDate($param['from']); ?> - To: <?php echo Helper::formatDate($param['to']); ?>

                </h5>
            </div>

            <table class="table">
                <thead>
                <tr>
                    <th>Date</th>
                    <th>Record type</th>
                    <th>Name</th>
                    <th>VAT</th>
                    <th>Reference</th>
                    <th>Note</th>
                </tr>
                </thead>

                <tbody>
                <tr>
                    <td class="text-center" colspan="6">No transactions</td>
                </tr>
                </tbody>
            </table>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.report', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>