84 lines
2.7 KiB
HTML
84 lines
2.7 KiB
HTML
|
<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-date-picker
|
||
|
vn-one
|
||
|
label="Expedition date"
|
||
|
ng-model="$ctrl.invoiceIn.issued">
|
||
|
</vn-date-picker>
|
||
|
<vn-date-picker
|
||
|
vn-one
|
||
|
label="Operation date"
|
||
|
ng-model="$ctrl.invoiceIn.operated">
|
||
|
</vn-date-picker>
|
||
|
</vn-horizontal>
|
||
|
<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"
|
||
|
required="true">
|
||
|
<tpl-item>
|
||
|
{{::id}} - {{::nickname}}
|
||
|
</tpl-item>
|
||
|
</vn-autocomplete>
|
||
|
<vn-textfield
|
||
|
label="Supplier ref"
|
||
|
ng-model="$ctrl.invoiceIn.supplierRef">
|
||
|
</vn-textfield>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-date-picker
|
||
|
vn-one
|
||
|
label="Entry date"
|
||
|
ng-model="$ctrl.invoiceIn.bookEntried">
|
||
|
</vn-date-picker>
|
||
|
<vn-date-picker
|
||
|
vn-one
|
||
|
label="Accounted date"
|
||
|
ng-model="$ctrl.invoiceIn.booked">
|
||
|
</vn-date-picker>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-autocomplete
|
||
|
vn-one
|
||
|
label="Currency"
|
||
|
ng-model="$ctrl.invoiceIn.currencyFk"
|
||
|
url="Currencies"
|
||
|
show-field="name"
|
||
|
value-field="id">
|
||
|
</vn-autocomplete>
|
||
|
<vn-autocomplete
|
||
|
url="Companies"
|
||
|
label="Company"
|
||
|
show-field="code"
|
||
|
value-field="id"
|
||
|
ng-model="$ctrl.invoiceIn.companyFk">
|
||
|
</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>
|