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">
|
|
|
|
</vn-crud-model>
|
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"
|
|
|
|
ng-model="$ctrl.clientsNumber">
|
|
|
|
</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+'%'}}]}"
|
|
|
|
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+'%'}}]}"
|
|
|
|
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>
|