clientareainvoices.tpl 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {*
  2. **********************************************************
  3. * Developed by: Team Theme Metro
  4. * Website: http://www.thememetro.com
  5. **********************************************************
  6. *}
  7. {if $invoices}
  8. {include file="$template/includes/tablelist.tpl" tableName="InvoicesList" filterColumn="4" noSortColumns="5"}
  9. <script>
  10. jQuery(document).ready( function () {
  11. var table = jQuery('#tableInvoicesList').show().DataTable();
  12. {if $orderby == 'default'}
  13. table.order([4, 'desc'], [2, 'asc']);
  14. {elseif $orderby == 'invoicenum'}
  15. table.order(0, '{$sort}');
  16. {elseif $orderby == 'date'}
  17. table.order(1, '{$sort}');
  18. {elseif $orderby == 'duedate'}
  19. table.order(2, '{$sort}');
  20. {elseif $orderby == 'total'}
  21. table.order(3, '{$sort}');
  22. {elseif $orderby == 'status'}
  23. table.order(4, '{$sort}');
  24. {/if}
  25. table.draw();
  26. jQuery('#tableLoading').hide();
  27. });
  28. </script>
  29. <div class="table-container clearfix">
  30. <div class="table-header">
  31. <label>{lang key='view'}</label>
  32. <div class="dropdown view-filter-btns">
  33. <button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  34. <span>{lang key='domainRenewal.showAll'}</span>
  35. </button>
  36. <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenuButton">
  37. <li><a href="#" class="dropdown-item"><span data-value="all">{lang key='domainRenewal.showAll'}</span></a></li>
  38. {foreach key=status item=count from=$invoices|@array_column:'status'|@array_count_values}
  39. <li><a href="#" class="dropdown-item"><span data-value="{$status|strip_tags|substr:1:-1}">{$status|strip_tags|substr:1:-1}</span></a></li>
  40. {/foreach}
  41. </ul>
  42. </div>
  43. </div>
  44. <table id="tableInvoicesList" class="datatable table table-hover w-hidden">
  45. <thead>
  46. <tr>
  47. <th data-class="expand">{$LANG.invoicestitle}</th>
  48. <th data-hide="phone,tablet">{$LANG.invoicesdatecreated}</th>
  49. <th data-hide="phone">{$LANG.invoicesdatedue}</th>
  50. <th>{$LANG.invoicestotal}</th>
  51. <th>{$LANG.invoicesstatus}</th>
  52. <th class="col-small center"></th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. {foreach $invoices as $invoice}
  57. <tr onclick="clickableSafeRedirect(event, 'viewinvoice.php?id={$invoice.id}', false)">
  58. <td><a href="viewinvoice.php?id={$invoice.id}" style="word-break: normal;">{$invoice.invoicenum}</a></td>
  59. <td><span class="w-hidden">{$invoice.normalisedDateCreated}</span>{$invoice.datecreated}</td>
  60. <td><span class="w-hidden">{$invoice.normalisedDateDue}</span>{$invoice.datedue}</td>
  61. <td data-order="{$invoice.totalnum}">{$invoice.total}</td>
  62. <td><span class="label status status-{$invoice.statusClass}">{$invoice.status|strip_tags|substr:1:-1}</span></td>
  63. <td class="col-small center">
  64. <div class="action-buttons">
  65. <a href="viewinvoice.php?id={$invoice.id}" data-toggle="tooltip" title="{if $invoice.statusClass == 'unpaid'}{$LANG.invoicespaynow}{else}{$LANG.invoicesview}{/if}">
  66. <i class="fal fa-search-plus {if $invoice.statusClass == 'unpaid'}text-danger{/if}"></i>
  67. </a>
  68. </div>
  69. </td>
  70. </tr>
  71. {/foreach}
  72. </tbody>
  73. </table>
  74. <div class="text-center" id="tableLoading">
  75. <p><i class="fas fa-spinner fa-spin"></i> {$LANG.loading}</p>
  76. </div>
  77. </div>
  78. {else}
  79. <div class="alert-lg no-data">
  80. <div class="icon">
  81. <i class="fas fa-exclamation-triangle"></i>
  82. </div>
  83. <div class="text">
  84. {$LANG.norecordsfound}
  85. </div>
  86. </div>
  87. {/if}