
                    <?php
                    if (($invoices ?? false) && ($num_invoices = count($invoices)) > 0) {
                    ?>
                    <div class="table-responsive">
                        <table class="table table-curved table-striped">
                            <thead>
                                <tr>
                                    <th><i class="fas fa-share fa-flip-vertical"></i></th>
                                    <th><?php $this->_('ClientQuotations.invoices.heading_invoice');?></th>
                                    <th><?php $this->_('ClientQuotations.invoices.heading_amount');?></th>
                                    <th><?php $this->_('ClientQuotations.invoices.heading_paid');?></th>
                                    <th><?php $this->_('ClientQuotations.invoices.heading_date_billed');?></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                for ($i = 0; $i < $num_invoices; $i++) {
                                ?>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td><a href="<?php echo $this->Html->safe($this->base_uri . 'invoices/view/' . ($invoices[$i]->id ?? null) . '/');?>"><?php (print (isset($invoices[$i]->id_code) ? $this->Html->safe($invoices[$i]->id_code) : null));?></a></td>
                                    <td><?php echo $this->CurrencyFormat->format((isset($invoices[$i]->total) ? $this->Html->safe($invoices[$i]->total) : null), (isset($invoices[$i]->currency) ? $this->Html->safe($invoices[$i]->currency) : null), ['html_code' => true]);?></td>
                                    <td><?php echo $this->CurrencyFormat->format((isset($invoices[$i]->paid) ? $this->Html->safe($invoices[$i]->paid) : null), (isset($invoices[$i]->currency) ? $this->Html->safe($invoices[$i]->currency) : null), ['html_code' => true]);?></td>
                                    <td><?php echo $this->Date->cast((isset($invoices[$i]->date_billed) ? $this->Html->safe($invoices[$i]->date_billed) : null), 'date_time');?></td>
                                </tr>
                                <?php
                                }
                                ?>
                            </tbody>
                        </table>
                    </div>
                    <?php
                    } else {
                    ?>
                    <div class="alert alert-info">
                        <p><?php $this->_('ClientQuotations.invoices.no_results');?></p>
                    </div>
                    <?php
                    }
                    ?>
