2018-10-23 09:25:51 +00:00
|
|
|
<mg-ajax path="/client/api/Clients/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
2017-09-08 07:53:37 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.client"
|
|
|
|
form="form"
|
2018-10-23 09:25:51 +00:00
|
|
|
save="patch">
|
2017-05-23 08:58:17 +00:00
|
|
|
</vn-watcher>
|
2018-12-14 11:56:21 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-horizontal>
|
2018-05-31 11:34:48 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
2019-04-16 09:32:45 +00:00
|
|
|
label="Billing data"
|
2018-10-16 11:06:58 +00:00
|
|
|
vn-acl="salesAssistant"
|
2018-03-01 22:38:14 +00:00
|
|
|
field="$ctrl.client.payMethodFk"
|
|
|
|
url="/client/api/PayMethods"
|
2018-10-18 07:24:20 +00:00
|
|
|
fields="['ibanRequired']"
|
2018-05-31 11:34:48 +00:00
|
|
|
initial-data="$ctrl.client.payMethod">
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
2019-03-26 06:29:45 +00:00
|
|
|
<vn-input-number vn-one min="0" step="1"
|
2018-05-31 11:45:51 +00:00
|
|
|
label="Due day"
|
|
|
|
field="$ctrl.client.dueDay"
|
2018-10-17 10:49:18 +00:00
|
|
|
vn-acl="salesAssistant">
|
2019-03-26 06:29:45 +00:00
|
|
|
</vn-input-number>
|
2018-05-31 11:45:51 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-03-12 10:10:05 +00:00
|
|
|
<vn-textfield
|
2018-05-31 11:34:48 +00:00
|
|
|
vn-one
|
2018-05-31 11:45:51 +00:00
|
|
|
label="IBAN"
|
|
|
|
field="$ctrl.client.iban"
|
2018-11-07 08:17:07 +00:00
|
|
|
on-change="$ctrl.autofillBic()"
|
2018-10-17 10:49:18 +00:00
|
|
|
vn-acl="salesAssistant">
|
2018-03-12 10:10:05 +00:00
|
|
|
</vn-textfield>
|
2018-10-17 10:49:18 +00:00
|
|
|
<vn-autocomplete vn-one
|
2018-10-16 11:06:58 +00:00
|
|
|
label="Swift / BIC"
|
|
|
|
url="/client/api/BankEntities"
|
|
|
|
field="$ctrl.client.bankEntityFk"
|
2018-10-23 09:25:51 +00:00
|
|
|
fields="['name']"
|
2018-10-16 11:06:58 +00:00
|
|
|
initial-data="$ctrl.client.bankEntityFk"
|
2018-11-22 14:17:35 +00:00
|
|
|
on-change="$ctrl.autofillBic()"
|
2019-01-28 09:04:08 +00:00
|
|
|
search-function="{or: [{bic: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
|
2018-10-16 11:06:58 +00:00
|
|
|
value-field="id"
|
|
|
|
show-field="bic"
|
2018-11-23 07:44:19 +00:00
|
|
|
vn-acl="salesAssistant"
|
|
|
|
disabled="$ctrl.ibanCountry == 'ES'">
|
2018-10-16 11:06:58 +00:00
|
|
|
<tpl-item>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-one>{{bic}}</vn-one>
|
|
|
|
<vn-one>
|
|
|
|
<div class="ellipsize" style="max-width: 10em">{{name}}</div>
|
|
|
|
</vn-one>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2018-10-17 10:49:18 +00:00
|
|
|
<vn-icon-button vn-auto margin-medium-v
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New bank entity"
|
|
|
|
vn-dialog="bankEntityDialog"
|
2018-10-16 11:06:58 +00:00
|
|
|
vn-acl="salesAssistant">
|
2018-10-17 10:49:18 +00:00
|
|
|
</vn-icon-button>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-horizontal>
|
2018-05-31 11:45:51 +00:00
|
|
|
<vn-horizontal pad-small-v>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-one>
|
2018-03-12 10:10:05 +00:00
|
|
|
<vn-check
|
2018-07-10 12:47:52 +00:00
|
|
|
label="Received LCR"
|
|
|
|
field="$ctrl.client.hasLcr"
|
2018-10-16 11:06:58 +00:00
|
|
|
vn-acl="salesAssistant">
|
2018-03-12 10:10:05 +00:00
|
|
|
</vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
2018-03-12 10:10:05 +00:00
|
|
|
<vn-check
|
|
|
|
label="Received core VNL"
|
|
|
|
field="$ctrl.client.hasCoreVnl"
|
2018-10-16 11:06:58 +00:00
|
|
|
vn-acl="salesAssistant">
|
2018-03-12 10:10:05 +00:00
|
|
|
</vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-one>
|
|
|
|
<vn-one>
|
2018-03-12 10:10:05 +00:00
|
|
|
<vn-check
|
|
|
|
label="Received B2B VNL"
|
|
|
|
field="$ctrl.client.hasSepaVnl"
|
2018-10-16 11:06:58 +00:00
|
|
|
vn-acl="salesAssistant">
|
2018-03-12 10:10:05 +00:00
|
|
|
</vn-check>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-one>
|
|
|
|
</vn-horizontal>
|
2017-05-23 08:58:17 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2018-10-16 11:06:58 +00:00
|
|
|
<vn-submit label="Save" vn-acl="salesAssistant"></vn-submit>
|
2017-05-23 08:58:17 +00:00
|
|
|
</vn-button-bar>
|
2018-10-17 10:49:18 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<!-- Create bank entity dialog -->
|
|
|
|
<vn-dialog class="edit"
|
|
|
|
vn-id="bankEntityDialog"
|
|
|
|
on-open="$ctrl.onBankEntityOpen()"
|
|
|
|
on-response="$ctrl.onBankEntityResponse(response)">
|
|
|
|
<tpl-body>
|
|
|
|
<h5 pad-small-v translate>New bank entity</h5>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one
|
|
|
|
label="Name"
|
|
|
|
model="$ctrl.newBankEntity.name">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete vn-one
|
|
|
|
label="Country"
|
|
|
|
field="$ctrl.newBankEntity.countryFk"
|
|
|
|
url="/client/api/Countries"
|
|
|
|
value-field="id"
|
|
|
|
show-field="country">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2019-03-07 08:55:22 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one
|
|
|
|
label="Code"
|
|
|
|
model="$ctrl.newBankEntity.id">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2018-10-17 10:49:18 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one
|
|
|
|
label="Swift / BIC"
|
|
|
|
model="$ctrl.newBankEntity.bic">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="ACCEPT" translate>Create</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|