2020-09-02 12:08:56 +00:00
|
|
|
<mg-ajax path="Entries" options="vnPost"></mg-ajax>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.entry"
|
|
|
|
form="form"
|
|
|
|
save="post">
|
|
|
|
</vn-watcher>
|
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
2020-09-03 06:09:37 +00:00
|
|
|
<vn-icon color-marginal
|
|
|
|
icon="info"
|
|
|
|
vn-tooltip="Required fields (*)">
|
|
|
|
</vn-icon>
|
2020-09-02 12:08:56 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.entry.supplierFk"
|
|
|
|
url="Suppliers"
|
|
|
|
show-field="nickname"
|
|
|
|
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
|
|
|
|
value-field="id"
|
|
|
|
order="nickname"
|
2020-09-03 06:09:37 +00:00
|
|
|
label="Supplier"
|
|
|
|
required="true">
|
2020-09-02 12:08:56 +00:00
|
|
|
<tpl-item>
|
|
|
|
{{::id}} - {{::nickname}}
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2020-09-03 06:09:37 +00:00
|
|
|
<vn-autocomplete
|
2020-09-02 12:08:56 +00:00
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.entry.travelFk"
|
|
|
|
url="Travels/filter"
|
|
|
|
search-function="$ctrl.searchFunction($search)"
|
|
|
|
value-field="t.id"
|
|
|
|
order="t.id"
|
2020-09-03 06:09:37 +00:00
|
|
|
label="Travel"
|
|
|
|
required="true">
|
2020-09-02 12:08:56 +00:00
|
|
|
<tpl-item>
|
|
|
|
{{::agencyModeName}} - {{::warehouseInName}} ({{::shipped | date: 'dd/MM/yyyy'}}) →
|
|
|
|
{{::warehouseOutName}} ({{::landed | date: 'dd/MM/yyyy'}})
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
url="Companies"
|
|
|
|
label="Company"
|
|
|
|
show-field="code"
|
|
|
|
value-field="id"
|
2020-09-03 06:09:37 +00:00
|
|
|
ng-model="$ctrl.entry.companyFk"
|
|
|
|
required="true">
|
2020-09-02 12:08:56 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Create"></vn-submit>
|
|
|
|
<vn-button ui-sref="entry.index" label="Cancel"></vn-button>
|
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|