| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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">
- <colgroup>
- <col style="width: 1%"/>
- <col style="width: 15%"/>
- <col style="width: 55%"/>
- <col style="width: 10%"/>
- <col style="width: 10%"/>
- <col style="width: 10%"/>
- <col style="width: 1%"/>
- </colgroup>
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("No."))?></th>
- <th><?=htmlspecialchars(__("Status"))?></th>
- <th><?=htmlspecialchars(__("Items"))?></th>
- <th><?=htmlspecialchars(__("Subtotal"))?></th>
- <th><?=htmlspecialchars(__("Tax"))?></th>
- <th><?=htmlspecialchars(__("Total"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($invoices as $invoice) {
- ?>
- <tr>
- <td class="text-end">
- <a href="<?=htmlspecialchars($invoice->getUrl())?>"><?=$invoice->number?></a>
- </td>
- <td>
- <?=htmlspecialchars($invoice->getDisplayInvoiceStatus())?>
- </td>
- <td>
- <?php
- View::include("components/document_items_unstyled_list", ["items" => $invoice->getItems()]);
- ?>
- </td>
- <td class="text-end">
- <?=htmlspecialchars($invoice->getDisplaySubtotal())?>
- </td>
- <td class="text-end">
- <?=htmlspecialchars($invoice->getDisplayTax())?>
- </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>
|