salix/modules/supplier/front/billing-data/index.html

66 lines
1.9 KiB
HTML

<mg-ajax path="Suppliers/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.supplier"
form="form"
save="patch">
</vn-watcher>
<vn-crud-model
auto-load="true"
url="PayMethods"
data="paymethods">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="PayDems"
data="paydems">
</vn-crud-model>
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-autocomplete
vn-one
label="Billing data"
vn-acl="salesAssistant"
ng-model="$ctrl.supplier.payMethodFk"
data="paymethods"
fields="['ibanRequiredForSuppliers']"
initial-data="$ctrl.supplier.payMethod">
</vn-autocomplete>
<vn-autocomplete
vn-one
label="Payment deadline"
vn-acl="salesAssistant"
ng-model="$ctrl.supplier.payDemFk"
data="paydems"
fields="['id', 'payDem']"
show-field="payDem"
initial-data="$ctrl.supplier.payDem">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-input-number
vn-one
min="0"
step="1"
label="Pay day"
ng-model="$ctrl.supplier.payDay"
vn-focus
rule>
</vn-input-number>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit
label="Save"
disabled="!watcher.dataChanged()"
vn-acl="salesAssistant">
</vn-submit>
<vn-button
class="cancel"
label="Undo changes"
disabled="!watcher.dataChanged()"
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form>