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

125 lines
4.3 KiB
HTML

<mg-ajax path="/client/api/Clients/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.client"
form="form"
save="patch">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
<vn-card pad-large>
<vn-horizontal>
<vn-autocomplete
vn-one
label="Pay method"
vn-acl="salesAssistant"
field="$ctrl.client.payMethodFk"
url="/client/api/PayMethods"
fields="['ibanRequired']"
initial-data="$ctrl.client.payMethod">
</vn-autocomplete>
<vn-textfield
vn-one
label="Due day"
field="$ctrl.client.dueDay"
vn-acl="salesAssistant">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="IBAN"
field="$ctrl.client.iban"
on-change="$ctrl.autofillBic()"
vn-acl="salesAssistant">
</vn-textfield>
<vn-autocomplete vn-one
label="Swift / BIC"
url="/client/api/BankEntities"
field="$ctrl.client.bankEntityFk"
fields="['name']"
initial-data="$ctrl.client.bankEntityFk"
on-change="$ctrl.autofillBic()"
search-function="{or: [{bic: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
value-field="id"
show-field="bic"
vn-acl="salesAssistant"
disabled="$ctrl.ibanCountry == 'ES'">
<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>
<vn-icon-button vn-auto margin-medium-v
icon="add_circle"
vn-tooltip="New bank entity"
vn-dialog="bankEntityDialog"
vn-acl="salesAssistant">
</vn-icon-button>
</vn-horizontal>
<vn-horizontal pad-small-v>
<vn-one>
<vn-check
label="Received LCR"
field="$ctrl.client.hasLcr"
vn-acl="salesAssistant">
</vn-check>
</vn-one>
<vn-one>
<vn-check
label="Received core VNL"
field="$ctrl.client.hasCoreVnl"
vn-acl="salesAssistant">
</vn-check>
</vn-one>
<vn-one>
<vn-check
label="Received B2B VNL"
field="$ctrl.client.hasSepaVnl"
vn-acl="salesAssistant">
</vn-check>
</vn-one>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<vn-submit label="Save" vn-acl="salesAssistant"></vn-submit>
</vn-button-bar>
</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>
<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>