2021-08-02 11:35:38 +00:00
|
|
|
<tpl-title translate>
|
|
|
|
Create global invoice
|
|
|
|
</tpl-title>
|
|
|
|
<tpl-body id="manifold-form">
|
|
|
|
<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">
|
2022-10-21 08:06:34 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<div
|
|
|
|
class="progress vn-my-md"
|
|
|
|
ng-if="$ctrl.packageInvoicing">
|
|
|
|
<vn-horizontal>
|
|
|
|
<div>
|
|
|
|
{{'Calculating packages to invoice...' | translate}}
|
|
|
|
</div>
|
|
|
|
</vn-horizontal>
|
|
|
|
</div>
|
2021-08-10 09:48:29 +00:00
|
|
|
<div
|
|
|
|
class="progress vn-my-md"
|
2022-10-13 13:01:15 +00:00
|
|
|
ng-if="$ctrl.lastClientId">
|
2021-08-10 09:48:29 +00:00
|
|
|
<vn-horizontal>
|
2022-10-13 13:01:15 +00:00
|
|
|
<div>
|
|
|
|
{{'Id Client' | translate}}: {{$ctrl.currentClientId}}
|
|
|
|
{{'of' | translate}} {{::$ctrl.lastClientId}}
|
|
|
|
</div>
|
2021-08-10 09:48:29 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
</div>
|
2021-08-02 11:35:38 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<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-horizontal>
|
|
|
|
<vn-horizontal>
|
2022-10-17 08:19:07 +00:00
|
|
|
<vn-radio
|
|
|
|
label="All clients"
|
|
|
|
val="allClients"
|
2022-10-21 08:06:34 +00:00
|
|
|
ng-model="$ctrl.clientsNumber"
|
|
|
|
ng-click="$ctrl.$onInit()">
|
2022-10-17 08:19:07 +00:00
|
|
|
</vn-radio>
|
|
|
|
<vn-radio
|
|
|
|
label="Clients range"
|
|
|
|
val="clientsRange"
|
|
|
|
ng-model="$ctrl.clientsNumber">
|
|
|
|
</vn-radio>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal ng-show="$ctrl.clientsNumber == 'clientsRange'">
|
2021-08-02 11:35:38 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
url="Clients"
|
|
|
|
label="From client"
|
|
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
2022-10-21 08:06:34 +00:00
|
|
|
order="id"
|
2021-08-02 11:35:38 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.invoice.fromClientId">
|
|
|
|
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
|
|
|
url="Clients"
|
|
|
|
label="To client"
|
|
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
2022-10-21 08:06:34 +00:00
|
|
|
order="id"
|
2021-08-02 11:35:38 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.invoice.toClientId">
|
|
|
|
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
url="Companies"
|
|
|
|
label="Company"
|
|
|
|
show-field="code"
|
|
|
|
value-field="id"
|
|
|
|
ng-model="$ctrl.invoice.companyFk">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
2022-10-13 13:01:15 +00:00
|
|
|
<button vn-id="invoiceButton" response="accept" translate>Invoice</button>{{$ctrl.isInvoicing}}
|
2021-08-02 11:35:38 +00:00
|
|
|
</tpl-buttons>
|