| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace App;
- /**
- * @var Sale $sale
- */
- use App\Helpers\HtmlHelper;
- ?>
- <section class="mb-4">
- <h3><?=htmlspecialchars(__("Invoices"))?></h3>
- <?php
- $invoices = $sale->getInvoices();
- if(empty($invoices)) {
- HtmlHelper::renderInfoAlert(__("No invoices to display."));
- }
- else {
- ?>
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("Number"))?></th>
- <th><?=htmlspecialchars(__("Status"))?></th>
- <th><?=htmlspecialchars(__("Total"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($invoices as $invoice) {
- ?>
- <tr>
- <td class="text-end">
- <?=$invoice->number?>
- </td>
- <td>
- <?=htmlspecialchars($invoice->getDisplayInvoiceStatus())?>
- </td>
- <td class="text-end">
- <?=htmlspecialchars($invoice->getDisplayTotal())?>
- </td>
- <td class="p-1">
- <a href="<?=htmlspecialchars($invoice->getUrl())?>" class="btn btn-sm btn-primary">
- <?=htmlspecialchars(__("View"))?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- }
- ?>
- </section>
|