<div class="col-md-3">
    <div class="form-group">
        <?php echo Form::label('client_id', trans('application.client')); ?>

        <?php echo Form::select('client',$clients,null, ['class' => 'form-control input-sm chosen', 'id' => 'client_id', 'required']); ?>

    </div>
</div>

<div class="col-md-3">
    <label> </label>
    <div class="form-group">
        <a href="javascript: void(0);" onclick="javascript: invoices_report();" class="btn btn-large btn-sm btn-success"  style="margin:6px"><i class="fa fa-check"></i> <?php echo e(trans('application.generate_report')); ?> </a>
    </div>
</div>
<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 foreach($invoices as $invoice): ?>
        <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($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($invoice->currency.' '.format_amount($invoice->totals['grandTotal'])); ?> </td>
            <td class="text-right"><?php echo e($invoice->currency.' '.format_amount($invoice->totals['paidFormatted'])); ?> </td>
            <td class="text-right"><?php echo e($invoice->currency.' '.format_amount($invoice->totals['amountDue'])); ?> </td>
        </tr>


    <?php endforeach; ?>
    </tbody>
</table>
</div>