salix/modules/invoiceOut/front/global-invoicing/index.html

105 lines
3.5 KiB
HTML

<vn-card class="vn-w-lg vn-ma-md">
<h5 ng-if="$ctrl.packageInvoicing" translate text-center class="vn-pa-md">{{'Calculating packages to invoice...'}}</h5>
<vn-vertical ng-if="$ctrl.clients.length" text-center class="vn-pa-md">
<h5 translate ng-if="$ctrl.percentage != 100">Invoicing</h5>
<h5 translate ng-if="$ctrl.percentage == 100">Ended process</h5>
<div>
{{'Current client id' | translate}}: {{$ctrl.currentClientId}}
</div>
<h6>
{{($ctrl.percentage / 100) | percentage: 0}} ({{$ctrl.currentClient}} {{'of' | translate}} {{$ctrl.clients.length}})
</h6>
</vn-vertical>
</vn-card>
<vn-card class="vn-w-lg">
<vn-table ng-if="data.length">
<vn-thead>
<vn-tr>
<vn-th field="clientId" number>Client id</vn-th>
<vn-th field="nickname">Nickname</vn-th>
<vn-th field="addressId" number>Address id</vn-th>
<vn-th field="street" expand>Street</vn-th>
<vn-th field="error" expand>Error</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr
ng-repeat="client in data">
<vn-td number>
<span
vn-click-stop="clientDescriptor.show($event, client.id)"
class="link">
{{::client.id}}
</span>
</vn-td>
<vn-td expand>
{{::client.address.nickname}}
</vn-td>
<vn-td number>
{{::client.address.id}}
</vn-td>
<vn-td expand>
{{::client.address.street}}
</vn-td>
<vn-td expand id="error">
<vn-spinner
ng-if="client.status == 'waiting'"
enable="true">
</vn-spinner>
{{::client.error}}
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
<vn-side-menu side="right">
<vn-crud-model
auto-load="true"
url="InvoiceOutSerials"
data="invoiceOutSerials"
order="code">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="Companies"
data="companies"
order="code">
</vn-crud-model>
<form class="vn-pa-md">
<vn-vertical>
<vn-date-picker
vn-one
label="Invoice date"
ng-model="$ctrl.invoice.invoiceDate">
</vn-date-picker>
<vn-date-picker
vn-one
label="Max date"
ng-model="$ctrl.invoice.maxShipped">
</vn-date-picker>
<vn-autocomplete
url="Companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.invoice.companyFk">
</vn-autocomplete>
<vn-autocomplete
url="Printers"
label="Printer"
show-field="name"
value-field="id"
where="{isLabeler: false}"
ng-model="$ctrl.invoice.printerFk">
</vn-autocomplete>
<vn-submit vn-id="invoiceButton" ng-click="$ctrl.makeInvoice()" label="Invoice out"></vn-submit>
</vn-vertical>
</form>
</vn-side-menu>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>