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

146 lines
5.0 KiB
HTML
Raw Normal View History

<mg-ajax path="Clients/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.client"
form="form"
save="patch">
2017-05-23 08:58:17 +00:00
</vn-watcher>
2019-11-10 10:08:44 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
2018-03-01 22:38:14 +00:00
<vn-horizontal>
2018-05-31 11:34:48 +00:00
<vn-autocomplete
vn-one
label="Billing data"
2018-10-16 11:06:58 +00:00
vn-acl="salesAssistant"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.payMethodFk"
url="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>
<vn-input-number
vn-one
min="0"
step="1"
2018-05-31 11:45:51 +00:00
label="Due day"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.dueDay"
vn-acl="salesAssistant"
rule>
</vn-input-number>
2018-05-31 11:45:51 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-textfield
2018-05-31 11:34:48 +00:00
vn-one
2018-05-31 11:45:51 +00:00
label="IBAN"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.iban"
rule
on-change="$ctrl.autofillBic()"
2018-10-17 10:49:18 +00:00
vn-acl="salesAssistant">
</vn-textfield>
<vn-autocomplete
vn-one
2018-10-16 11:06:58 +00:00
label="Swift / BIC"
url="BankEntities"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.bankEntityFk"
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>
<append>
<vn-icon-button
vn-auto
icon="add_circle"
2019-11-28 11:54:34 +00:00
ng-click="$ctrl.onAddEntityClick($event)"
vn-tooltip="New bank entity"
vn-acl="salesAssistant">
</vn-icon-button>
</append>
2018-10-16 11:06:58 +00:00
</vn-autocomplete>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-horizontal>
<vn-check
vn-one
label="Received LCR"
ng-model="$ctrl.client.hasLcr"
vn-acl="salesAssistant">
</vn-check>
<vn-check
vn-one
label="Received core VNL"
ng-model="$ctrl.client.hasCoreVnl"
vn-acl="salesAssistant">
</vn-check>
<vn-check
vn-one
label="Received B2B VNL"
ng-model="$ctrl.client.hasSepaVnl"
vn-acl="salesAssistant">
</vn-check>
2018-03-01 22:38:14 +00:00
</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>
2019-09-18 07:41:25 +00:00
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
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"
2019-11-28 11:54:34 +00:00
on-accept="$ctrl.onBankEntityAccept()">
2018-10-17 10:49:18 +00:00
<tpl-body>
<h5 class="vn-py-sm" translate>New bank entity</h5>
2018-10-17 10:49:18 +00:00
<vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
2018-10-17 10:49:18 +00:00
label="Name"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.newBankEntity.name"
2019-06-17 06:14:48 +00:00
required="true">
2018-10-17 10:49:18 +00:00
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-autocomplete
vn-one
vn-id="country"
2018-10-17 10:49:18 +00:00
label="Country"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.newBankEntity.countryFk"
2019-06-17 06:14:48 +00:00
fields="['id', 'country', 'code']"
url="Countries"
2018-10-17 10:49:18 +00:00
value-field="id"
2019-06-17 06:14:48 +00:00
show-field="country"
required="true">
2018-10-17 10:49:18 +00:00
</vn-autocomplete>
</vn-horizontal>
2019-03-07 08:55:22 +00:00
<vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
2019-06-17 06:14:48 +00:00
label="Entity Code"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.newBankEntity.id"
2019-06-17 06:14:48 +00:00
ng-show="country.selection.code === 'ES'">
2019-03-07 08:55:22 +00:00
</vn-textfield>
</vn-horizontal>
2018-10-17 10:49:18 +00:00
<vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-textfield
vn-one
2018-10-17 10:49:18 +00:00
label="Swift / BIC"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.newBankEntity.bic"
2019-06-17 06:14:48 +00:00
required="true">
2018-10-17 10:49:18 +00:00
</vn-textfield>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
2019-10-30 15:57:14 +00:00
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Create</button>
2018-10-17 10:49:18 +00:00
</tpl-buttons>
</vn-dialog>