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

145 lines
4.7 KiB
HTML
Raw Normal View History

2023-02-23 08:25:23 +00:00
<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>
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">
<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>
<vn-td expand>
2023-02-23 08:25:23 +00:00
{{::error.address.clientName}}
2022-12-27 12:50:10 +00:00
</vn-td>
<vn-td number>
2023-02-23 08:25:23 +00:00
{{::error.address.id}}
</vn-td>
<vn-td expand>
2023-02-23 08:25:23 +00:00
{{::error.address.nickname}}
</vn-td>
2023-02-23 08:25:23 +00:00
<vn-td expand>
<span class="chip 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'">
<tpl-item>{{::id}} - {{::name}}</tpl-item>
</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-02-23 08:25:23 +00:00
ng-model="$ctrl.companyFk">
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"
ng-click="$ctrl.stopInvoicing()">
</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>