148 lines
4.9 KiB
HTML
148 lines
4.9 KiB
HTML
<vn-card
|
|
ng-if="$ctrl.status"
|
|
class="vn-w-lg vn-pa-md"
|
|
style="height: 80px; display: flex; align-items: center; justify-content: center; gap: 20px;">
|
|
<vn-spinner
|
|
enable="$ctrl.status != 'done'">
|
|
</vn-spinner>
|
|
<div>
|
|
<div ng-switch="$ctrl.status">
|
|
<span ng-switch-when="packageInvoicing" translate>
|
|
Build packaging tickets
|
|
</span>
|
|
<span ng-switch-when="invoicing">
|
|
{{'Invoicing client' | translate}} {{$ctrl.currentAddress.clientId}}
|
|
</span>
|
|
<span ng-switch-when="stopping" translate>
|
|
Stopping process
|
|
</span>
|
|
<span ng-switch-when="done" translate>
|
|
Ended process
|
|
</span>
|
|
</div>
|
|
<div ng-if="$ctrl.nAddresses" class="text-caption text-secondary">
|
|
{{$ctrl.percentage | percentage: 0}} ({{$ctrl.addressNumber}} {{'of' | translate}} {{$ctrl.nAddresses}})
|
|
</div>
|
|
</div>
|
|
</vn-card>
|
|
<vn-card class="vn-w-lg vn-mt-md" ng-if="$ctrl.errors.length">
|
|
<vn-table>
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th number>Id</vn-th>
|
|
<vn-th>Client</vn-th>
|
|
<vn-th number>Address id</vn-th>
|
|
<vn-th>Street</vn-th>
|
|
<vn-th>Error</vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="error in $ctrl.errors">
|
|
<vn-td number>
|
|
<span
|
|
vn-click-stop="clientDescriptor.show($event, error.address.clientId)"
|
|
class="link">
|
|
{{::error.address.clientId}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td expand>
|
|
{{::error.address.clientName}}
|
|
</vn-td>
|
|
<vn-td number>
|
|
{{::error.address.id}}
|
|
</vn-td>
|
|
<vn-td expand>
|
|
{{::error.address.nickname}}
|
|
</vn-td>
|
|
<vn-td expand>
|
|
<span class="chip alert">{{::error.message}}</span>
|
|
</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-vertical class="vn-mb-sm">
|
|
<vn-radio
|
|
label="All clients"
|
|
val="all"
|
|
ng-model="$ctrl.clientsToInvoice">
|
|
</vn-radio>
|
|
<vn-radio
|
|
label="One client"
|
|
val="one"
|
|
ng-model="$ctrl.clientsToInvoice">
|
|
</vn-radio>
|
|
</vn-vertical>
|
|
<vn-autocomplete
|
|
url="Clients"
|
|
label="Client"
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
|
order="id"
|
|
show-field="name"
|
|
value-field="id"
|
|
ng-model="$ctrl.clientId"
|
|
required="true"
|
|
ng-if="$ctrl.clientsToInvoice == 'one'">
|
|
<tpl-item>
|
|
<div>{{::name}}</div>
|
|
<div class="text-secondary text-caption">#{{::id}}</div>
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
<vn-date-picker
|
|
vn-one
|
|
label="Invoice date"
|
|
ng-model="$ctrl.invoiceDate">
|
|
</vn-date-picker>
|
|
<vn-date-picker
|
|
vn-one
|
|
label="Max date"
|
|
ng-model="$ctrl.maxShipped">
|
|
</vn-date-picker>
|
|
<vn-autocomplete
|
|
url="Companies"
|
|
label="Company"
|
|
show-field="code"
|
|
value-field="id"
|
|
ng-model="$ctrl.companyFk">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
url="Printers"
|
|
label="Printer"
|
|
show-field="name"
|
|
value-field="id"
|
|
where="{isLabeler: false}"
|
|
ng-model="$ctrl.printerFk">
|
|
</vn-autocomplete>
|
|
<vn-submit
|
|
ng-if="!$ctrl.invoicing"
|
|
ng-click="$ctrl.makeInvoice()"
|
|
label="Invoice out">
|
|
</vn-submit>
|
|
<vn-submit
|
|
ng-if="$ctrl.invoicing"
|
|
label="Stop"
|
|
ng-click="$ctrl.stopInvoicing()">
|
|
</vn-submit>
|
|
</vn-vertical>
|
|
</form>
|
|
</vn-side-menu>
|
|
|
|
<vn-client-descriptor-popover
|
|
vn-id="clientDescriptor">
|
|
</vn-client-descriptor-popover>
|