salix/modules/supplier/front/account/index.html

86 lines
2.8 KiB
HTML
Raw Normal View History

2021-01-07 14:14:38 +00:00
<vn-crud-model
vn-id="model"
url="SupplierAccounts"
2021-04-01 15:36:27 +00:00
fields="['id', 'supplierFk', 'iban', 'bankEntityFk', 'beneficiary']"
2021-01-08 09:46:50 +00:00
link="{supplierFk: $ctrl.$params.id}"
2021-01-07 14:14:38 +00:00
include="$ctrl.include"
data="$ctrl.supplierAccounts"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
data="$ctrl.supplierAccounts"
form="form">
</vn-watcher>
2021-04-01 15:36:27 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-lg">
2021-01-07 14:14:38 +00:00
<vn-card class="vn-pa-lg">
<vn-horizontal ng-repeat="supplierAccount in $ctrl.supplierAccounts">
2021-08-23 12:47:26 +00:00
<vn-textfield
label="Iban"
ng-model="supplierAccount.iban"
on-change="supplierAccount.bankEntityFk = supplierAccount.iban.slice(4,8)"
rule>
2021-01-08 15:01:13 +00:00
</vn-textfield>
2021-08-23 12:47:26 +00:00
<vn-autocomplete
2021-01-07 14:14:38 +00:00
label="Bank entity"
ng-model="supplierAccount.bankEntityFk"
url="BankEntities"
2022-06-09 06:43:33 +00:00
fields="['name']"
initial-data="supplierAccount.bankEntityFk"
search-function="{or: [{bic: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
value-field="id"
show-field="bic"
2021-01-07 14:14:38 +00:00
rule>
2022-06-09 06:43:33 +00:00
<tpl-item>{{bic}} {{name}}</tpl-item>
2021-08-23 12:47:26 +00:00
<append>
<vn-icon-button
2021-12-01 07:29:05 +00:00
vn-auto
2021-08-23 12:47:26 +00:00
icon="add_circle"
2021-12-01 07:29:05 +00:00
vn-click-stop="bankEntity.show({index: $index})"
vn-tooltip="New bank entity">
2021-08-23 12:47:26 +00:00
</vn-icon-button>
</append>
2021-01-07 14:14:38 +00:00
</vn-autocomplete>
2021-08-23 12:47:26 +00:00
<vn-textfield
2021-03-31 05:33:00 +00:00
label="Beneficiary"
2021-04-01 15:36:27 +00:00
ng-model="supplierAccount.beneficiary"
info="Beneficiary information">
2021-03-31 05:33:00 +00:00
</vn-textfield>
2021-01-07 14:14:38 +00:00
<vn-none>
<vn-icon-button
vn-tooltip="Remove account"
icon="delete"
ng-click="model.remove($index)"
tabindex="-1">
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>
<vn-icon-button
vn-bind="+"
vn-tooltip="Add account"
icon="add_circle"
ng-click="$ctrl.add()">
</vn-icon-button>
</vn-one>
</vn-card>
<vn-button-bar>
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
</vn-button-bar>
</form>
2021-01-07 14:14:38 +00:00
<!-- New bankentity dialog -->
<vn-new-bank-entity
2021-02-17 11:07:04 +00:00
vn-id="bankEntity"
on-accept="$ctrl.onAccept($data)">
2021-08-15 06:35:14 +00:00
</vn-new-bank-entity>
<vn-confirm
class="edit"
vn-id="payMethodToTransfer"
2021-09-02 15:49:25 +00:00
on-accept="$ctrl.setWireTransfer()"
2021-08-15 06:35:14 +00:00
message="Do you want to change the pay method to wire transfer?">
</vn-confirm>