2023-02-23 08:25:23 +00:00
|
|
|
<vn-card
|
|
|
|
ng-if="$ctrl.status"
|
2023-06-23 09:42:30 +00:00
|
|
|
class="status vn-w-lg vn-pa-md">
|
2023-02-23 08:25:23 +00:00
|
|
|
<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>
|
2023-06-23 09:42:30 +00:00
|
|
|
<div ng-if="$ctrl.nAddresses">
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{$ctrl.percentage | percentage: 0}}
|
|
|
|
({{$ctrl.addressNumber}} <span translate>of</span> {{$ctrl.nAddresses}})
|
|
|
|
</div>
|
|
|
|
<div class="text-caption text-secondary">
|
|
|
|
{{$ctrl.nPdfs}} <span translate>of</span> {{$ctrl.totalPdfs}}
|
|
|
|
<span translate>PDFs</span>
|
|
|
|
</div>
|
2023-02-23 08:25:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-24 11:40:43 +00:00
|
|
|
</vn-card>
|
2023-02-23 08:25:23 +00:00
|
|
|
<vn-card class="vn-w-lg vn-mt-md" ng-if="$ctrl.errors.length">
|
|
|
|
<vn-table>
|
2022-12-27 12:50:10 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2023-02-23 08:25:23 +00:00
|
|
|
<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>
|
2022-12-27 12:50:10 +00:00
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
2023-02-23 08:25:23 +00:00
|
|
|
<vn-tr ng-repeat="error in $ctrl.errors">
|
2022-12-29 07:15:04 +00:00
|
|
|
<vn-td number>
|
2022-12-27 12:50:10 +00:00
|
|
|
<span
|
2023-02-23 08:25:23 +00:00
|
|
|
vn-click-stop="clientDescriptor.show($event, error.address.clientId)"
|
2022-12-27 12:50:10 +00:00
|
|
|
class="link">
|
2023-02-23 08:25:23 +00:00
|
|
|
{{::error.address.clientId}}
|
2022-12-27 12:50:10 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2023-01-30 11:13:01 +00:00
|
|
|
<vn-td expand>
|
2023-02-23 08:25:23 +00:00
|
|
|
{{::error.address.clientName}}
|
2022-12-27 12:50:10 +00:00
|
|
|
</vn-td>
|
2022-12-29 07:15:04 +00:00
|
|
|
<vn-td number>
|
2023-02-23 08:25:23 +00:00
|
|
|
{{::error.address.id}}
|
2022-12-29 07:15:04 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td expand>
|
2023-02-23 08:25:23 +00:00
|
|
|
{{::error.address.nickname}}
|
2022-12-29 07:15:04 +00:00
|
|
|
</vn-td>
|
2023-02-23 08:25:23 +00:00
|
|
|
<vn-td expand>
|
2023-06-22 05:49:35 +00:00
|
|
|
<span
|
|
|
|
class="chip"
|
|
|
|
ng-class="error.isWarning ? 'warning': 'alert'">
|
|
|
|
{{::error.message}}
|
|
|
|
</span>
|
2022-12-27 12:50:10 +00:00
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</vn-card>
|
2022-12-27 11:21:04 +00:00
|
|
|
<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>
|
2023-02-23 08:25:23 +00:00
|
|
|
<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'">
|
2023-05-05 06:12:38 +00:00
|
|
|
<tpl-item>
|
|
|
|
<div>{{::name}}</div>
|
|
|
|
<div class="text-secondary text-caption">#{{::id}}</div>
|
|
|
|
</tpl-item>
|
2023-02-23 08:25:23 +00:00
|
|
|
</vn-autocomplete>
|
2022-12-27 11:21:04 +00:00
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Invoice date"
|
2023-02-23 08:25:23 +00:00
|
|
|
ng-model="$ctrl.invoiceDate">
|
2022-12-27 11:21:04 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Max date"
|
2023-02-23 08:25:23 +00:00
|
|
|
ng-model="$ctrl.maxShipped">
|
2022-12-27 11:21:04 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-autocomplete
|
|
|
|
url="Companies"
|
|
|
|
label="Company"
|
|
|
|
show-field="code"
|
|
|
|
value-field="id"
|
2023-06-14 12:59:18 +00:00
|
|
|
ng-model="$ctrl.companyFk"
|
2023-06-15 05:24:17 +00:00
|
|
|
on-change="$ctrl.getInvoiceDate(value)">
|
2022-12-27 11:21:04 +00:00
|
|
|
</vn-autocomplete>
|
2023-01-17 09:46:16 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
url="Printers"
|
|
|
|
label="Printer"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
where="{isLabeler: false}"
|
2023-02-23 08:25:23 +00:00
|
|
|
ng-model="$ctrl.printerFk">
|
2023-01-17 09:46:16 +00:00
|
|
|
</vn-autocomplete>
|
2023-02-23 08:25:23 +00:00
|
|
|
<vn-submit
|
|
|
|
ng-if="!$ctrl.invoicing"
|
|
|
|
ng-click="$ctrl.makeInvoice()"
|
|
|
|
label="Invoice out">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-submit
|
|
|
|
ng-if="$ctrl.invoicing"
|
|
|
|
label="Stop"
|
2023-06-23 09:42:30 +00:00
|
|
|
ng-click="$ctrl.status = 'stopping'">
|
2023-02-23 08:25:23 +00:00
|
|
|
</vn-submit>
|
2023-01-17 09:46:16 +00:00
|
|
|
</vn-vertical>
|
2022-12-27 11:21:04 +00:00
|
|
|
</form>
|
|
|
|
</vn-side-menu>
|
|
|
|
|
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
|
|
|
</vn-client-descriptor-popover>
|