124 lines
3.9 KiB
HTML
124 lines
3.9 KiB
HTML
<mg-ajax path="Entries/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
|
<vn-watcher
|
|
vn-id="watcher"
|
|
data="$ctrl.entry"
|
|
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.entry.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-autocomplete
|
|
vn-one
|
|
ng-model="$ctrl.entry.travelFk"
|
|
url="Travels/filter"
|
|
search-function="$ctrl.searchFunction($search)"
|
|
value-field="id"
|
|
order="id"
|
|
label="Travel"
|
|
required="true">
|
|
<tpl-item>
|
|
{{::agencyModeName}} - {{::warehouseInName}} ({{::shipped | date: 'dd/MM/yyyy'}}) →
|
|
{{::warehouseOutName}} ({{::landed | date: 'dd/MM/yyyy'}})
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Reference"
|
|
ng-model="$ctrl.entry.ref"
|
|
rule
|
|
vn-focus>
|
|
</vn-textfield>
|
|
<vn-textfield
|
|
vn-one
|
|
label="Notes"
|
|
ng-model="$ctrl.entry.notes"
|
|
rule
|
|
vn-focus>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-textarea
|
|
vn-one
|
|
label="Observation"
|
|
ng-model="$ctrl.entry.observation"
|
|
rule>
|
|
</vn-textarea>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-one
|
|
label="Currency"
|
|
ng-model="$ctrl.entry.currencyFk"
|
|
url="Currencies"
|
|
show-field="code"
|
|
value-field="id">
|
|
</vn-autocomplete>
|
|
<vn-input-number
|
|
vn-one
|
|
min="0"
|
|
step="0.1"
|
|
label="Commission"
|
|
ng-model="$ctrl.entry.commission"
|
|
rule>
|
|
</vn-input-number>
|
|
<vn-autocomplete
|
|
url="Companies"
|
|
label="Company"
|
|
show-field="code"
|
|
value-field="id"
|
|
ng-model="$ctrl.entry.companyFk">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-check
|
|
label="Ordered"
|
|
ng-model="$ctrl.entry.isOrdered">
|
|
</vn-check>
|
|
<vn-check
|
|
label="Confirmed"
|
|
ng-model="$ctrl.entry.isConfirmed">
|
|
</vn-check>
|
|
<vn-check
|
|
label="Inventory"
|
|
ng-model="$ctrl.entry.isInventory">
|
|
</vn-check>
|
|
<vn-check
|
|
label="Raid"
|
|
ng-model="$ctrl.entry.isRaid">
|
|
</vn-check>
|
|
<vn-check
|
|
label="Booked"
|
|
ng-model="$ctrl.entry.isBooked">
|
|
</vn-check>
|
|
</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> |