<div class="col-md-12">
<table class="table table-hover table-bordered ">
    <thead>
    <tr class="table_header">
        <th><?php echo e(trans('application.status')); ?></th>
        <th><?php echo e(trans('application.invoice_number')); ?></th>
        <th><?php echo e(trans('application.date')); ?> </th>
        <th><?php echo e(trans('application.client')); ?></th>
        <th class="text-right"><?php echo e(trans('application.amount')); ?></th>
        <th class="text-right"><?php echo e(trans('application.paid')); ?></th>
        <th class="text-right"><?php echo e(trans('application.amount_due')); ?></th>
    </tr>
    </thead>
    <tbody>
    <?php ($total_invoiced = 0); ?>
    <?php ($total_paid = 0); ?>
    <?php ($total_due = 0); ?>
    <?php $__currentLoopData = $invoices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $invoice): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
        <?php ($total_invoiced += currency_convert(getCurrencyId($invoice->currency),$invoice->totals['grandTotal'])); ?>
        <?php ($total_paid += currency_convert(getCurrencyId($invoice->currency),$invoice->totals['paidFormatted'])); ?>
        <?php ($total_due += currency_convert(getCurrencyId($invoice->currency),$invoice->totals['amountDue'])); ?>
        <tr>
            <td><span class="label <?php echo e(statuses()[$invoice->status]['class']); ?>"><?php echo e(strtoupper(statuses()[$invoice->status]['label'])); ?></span></td>
            <td><a href="<?php echo e(route('invoices.show', $invoice->uuid)); ?>"><?php echo e($invoice->number); ?></a></td>
            <td><?php echo e(format_date($invoice->invoice_date)); ?></td>
            <td><a href="<?php echo e(route('clients.show', $invoice->client_id )); ?>"><?php echo e($invoice->client->name); ?></a></td>
            <td class="text-right"><?php echo e(defaultCurrency().' '.format_amount(currency_convert(getCurrencyId($invoice->currency),$invoice->totals['grandTotal']))); ?> </td>
            <td class="text-right"><?php echo e(defaultCurrency().' '.format_amount(currency_convert(getCurrencyId($invoice->currency),$invoice->totals['paidFormatted']))); ?> </td>
            <td class="text-right"><?php echo e(defaultCurrency().' '.format_amount(currency_convert(getCurrencyId($invoice->currency),$invoice->totals['amountDue']))); ?> </td>
        </tr>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
    <tr>
        <td class="text-bold" colspan="4"><?php echo e(trans('application.total')); ?></td>
        <td class="text-bold text-right"><?php echo e(defaultCurrency().' '.format_amount($total_invoiced)); ?></td>
        <td class="text-bold text-right"><?php echo e(defaultCurrency().' '.format_amount($total_paid)); ?></td>
        <td class="text-right text-bold text-red" colspan="4"><?php echo e(defaultCurrency().' '.format_amount($total_due)); ?></td>
    </tr>
    </tbody>
</table>
</div>