2021-04-15 08:47:39 +00:00
|
|
|
<mg-ajax path="InvoiceIns/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.invoiceIn"
|
|
|
|
form="form"
|
|
|
|
save="patch">
|
|
|
|
</vn-watcher>
|
|
|
|
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.invoiceIn.supplierFk"
|
|
|
|
url="Suppliers"
|
|
|
|
show-field="nickname"
|
|
|
|
search-function="{or: [{id: $search}, {nickname: {like: '%'+ $search +'%'}}]}"
|
|
|
|
value-field="id"
|
|
|
|
order="nickname"
|
|
|
|
label="Supplier"
|
2021-04-15 09:54:40 +00:00
|
|
|
required="true"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
<tpl-item>
|
|
|
|
{{::id}} - {{::nickname}}
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
|
|
|
label="Supplier ref"
|
2021-04-15 09:54:40 +00:00
|
|
|
ng-model="$ctrl.invoiceIn.supplierRef"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2021-06-10 15:08:21 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Expedition date"
|
|
|
|
ng-model="$ctrl.invoiceIn.issued"
|
|
|
|
vn-focus
|
|
|
|
rule>
|
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Operation date"
|
|
|
|
ng-model="$ctrl.invoiceIn.operated"
|
|
|
|
rule>
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-datalist vn-one
|
|
|
|
label="Undeductible VAT"
|
|
|
|
ng-model="$ctrl.invoiceIn.deductibleExpenseFk"
|
|
|
|
value-field="id"
|
|
|
|
order="name"
|
|
|
|
url="Expenses"
|
|
|
|
fields="['id','name']"
|
|
|
|
rule>
|
|
|
|
<tpl-item>
|
|
|
|
{{id}} - {{name}}
|
|
|
|
</tpl-item>
|
|
|
|
</vn-datalist>
|
|
|
|
</vn-horizontal>
|
2021-04-15 08:47:39 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Entry date"
|
2021-04-15 09:54:40 +00:00
|
|
|
ng-model="$ctrl.invoiceIn.bookEntried"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Accounted date"
|
2021-04-15 09:54:40 +00:00
|
|
|
ng-model="$ctrl.invoiceIn.booked"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Currency"
|
|
|
|
ng-model="$ctrl.invoiceIn.currencyFk"
|
|
|
|
url="Currencies"
|
2021-06-16 16:36:42 +00:00
|
|
|
show-field="code"
|
2021-04-15 09:54:40 +00:00
|
|
|
value-field="id"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
|
|
|
url="Companies"
|
|
|
|
label="Company"
|
|
|
|
show-field="code"
|
|
|
|
value-field="id"
|
2021-04-15 09:54:40 +00:00
|
|
|
ng-model="$ctrl.invoiceIn.companyFk"
|
|
|
|
rule>
|
2021-04-15 08:47:39 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Undo changes"
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|