salix/modules/invoice/front/index/index.html

84 lines
3.3 KiB
HTML
Raw Normal View History

2019-03-13 13:10:45 +00:00
<vn-crud-model
vn-id="model"
url="/api/InvoiceOuts"
filter="::$ctrl.filter"
limit="20"
data="invoices"
order="id ASC"
auto-load="false">
</vn-crud-model>
<div class="content-block">
<div class="vn-list">
<vn-card pad-medium-h>
<vn-searchbar
panel="vn-invoice-search-panel"
model="model"
expr-builder="$ctrl.exprBuilder(param, value)"
auto-load="true"
vn-focus>
</vn-searchbar>
</vn-card>
</div>
<vn-card margin-medium-v compact>
<vn-table model="model" auto-load="false">
<vn-thead>
<vn-tr>
<vn-th field="ref">Reference</vn-th>
<vn-th field="issued">Issued</vn-th>
<vn-th field="amount" number>Amount</vn-th>
<vn-th field="clientFk">Client</vn-th>
<vn-th field="created">Created</vn-th>
<vn-th field="companyFk">Company</vn-th>
<vn-th field="dued">Due date</vn-th>
<vn-th></vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<a ng-repeat="invoice in invoices"
class="clickable vn-tr searchResult"
ui-sref="invoice.card.summary({id: {{::invoice.id}}})">
<vn-td>{{::invoice.ref | dashIfEmpty}}</vn-td>
<vn-td>{{::invoice.issued | dateTime:'dd/MM/yyyy' | dashIfEmpty}}</vn-td>
<vn-td number>{{::invoice.amount | currency: 'EUR': 2 | dashIfEmpty}}</vn-td>
<vn-td>
<span
class="link"
ng-click="$ctrl.showClientDescriptor($event, invoice.clientFk)">
{{::invoice.client.name | dashIfEmpty}}
</span>
</vn-td>
<vn-td>{{::invoice.created | dateTime:'dd/MM/yyyy' | dashIfEmpty}}</vn-td>
<vn-td>{{::invoice.company.code | dashIfEmpty}}</vn-td>
<vn-td>{{::invoice.dued | dateTime:'dd/MM/yyyy' | dashIfEmpty}}</vn-td>
<vn-td>
<vn-icon-button
ng-show="invoice.hasPdf"
ng-click="$ctrl.openPdf(invoice.id)"
icon="cloud_download"
title="Download PDF"
vn-tooltip="Download PDF">
</vn-icon-button>
</vn-td>
<vn-td>
<vn-icon-button
ng-click="$ctrl.preview($event, invoice)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon-button>
</vn-td>
</a>
</vn-tbody>
</vn-table>
</vn-card>
<vn-pagination model="model"></vn-pagination>
</div>
<vn-dialog
vn-id="summary"
class="dialog-summary">
<tpl-body>
<vn-invoice-summary invoice="$ctrl.selectedTicket"></vn-invoice-summary>
</tpl-body>
</vn-dialog>
<vn-client-descriptor-popover vn-id="clientDescriptor"></vn-client-descriptor-popover>