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

151 lines
5.3 KiB
HTML
Raw Normal View History

<mg-ajax path="Clients/{{patch.params.id}}/updateFiscalData" options="vnPatch"></mg-ajax>
2017-02-21 15:21:55 +00:00
<vn-watcher
vn-id="watcher"
2017-06-03 11:01:47 +00:00
data="$ctrl.client"
2020-02-04 10:25:15 +00:00
id-field="id"
2017-02-21 15:21:55 +00:00
form="form"
2017-06-03 11:01:47 +00:00
save="patch">
2017-02-21 15:21:55 +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>
<vn-textfield
vn-two
vn-focus
label="Social name"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.socialName"
2019-10-11 15:38:04 +00:00
rule
info="You can use letters and spaces">
2018-03-01 22:38:14 +00:00
</vn-textfield>
<vn-textfield
vn-one
label="Tax number"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.fi"
rule>
2018-03-01 22:38:14 +00:00
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-two
label="Street"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.street"
rule>
2018-03-01 22:38:14 +00:00
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
2020-02-21 11:39:41 +00:00
<vn-autocomplete vn-id="country" vn-one
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.countryFk"
url="Countries"
2019-08-02 06:27:55 +00:00
show-field="country"
value-field="id"
2019-10-15 14:19:35 +00:00
label="Country"
rule>
2019-08-02 06:27:55 +00:00
</vn-autocomplete>
2020-02-21 11:39:41 +00:00
<vn-autocomplete vn-id="province" vn-one
label="Province"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.provinceFk"
2020-02-21 11:39:41 +00:00
selection="$ctrl.province"
url="Provinces/location"
fields="['id', 'name', 'countryFk']"
2019-08-02 06:27:55 +00:00
where="{countryFk: country.selection.id}"
show-field="name"
value-field="id"
2019-10-15 14:19:35 +00:00
rule>
2020-02-21 11:39:41 +00:00
<tpl-item>{{name}} ({{country.country}})</tpl-item>
2019-08-02 06:27:55 +00:00
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
2020-02-21 11:39:41 +00:00
<vn-datalist vn-id="town" vn-one
label="City"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.city"
2020-02-21 11:39:41 +00:00
selection="$ctrl.town"
url="Towns/location"
fields="['id', 'name', 'provinceFk']"
2019-08-02 06:27:55 +00:00
where="{provinceFk: province.selection.id}"
show-field="name"
2020-02-21 11:39:41 +00:00
value-field="name">
<tpl-item>{{name}} ({{province.name}}, {{province.country.country}})</tpl-item>
</vn-datalist>
<vn-datalist vn-one
label="Postcode"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.postcode"
2020-02-21 11:39:41 +00:00
selection="$ctrl.postcode"
url="Postcodes/location"
fields="['code','townFk']"
2019-08-02 06:27:55 +00:00
where="{townFk: town.selection.id}"
order="code, townFk"
value-field="code"
2020-02-21 11:39:41 +00:00
show-field="code"
rule>
<tpl-item>{{code}} - {{town.name}} ({{town.province.name}}, {{town.province.country.country}})</tpl-item>
</vn-datalist>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-horizontal>
2018-03-01 22:38:14 +00:00
<vn-check
vn-one
label="Active"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isActive">
2018-03-01 22:38:14 +00:00
</vn-check>
<vn-check
vn-one
2018-03-19 16:46:28 +00:00
label="Frozen"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isFreezed">
2018-03-19 16:46:28 +00:00
</vn-check>
2018-05-31 11:34:48 +00:00
</vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-horizontal>
2018-03-19 16:46:28 +00:00
<vn-check
2018-05-31 11:34:48 +00:00
vn-one
label="Has to invoice"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.hasToInvoice">
2018-03-01 22:38:14 +00:00
</vn-check>
<vn-check
2018-05-31 11:34:48 +00:00
vn-one
label="Vies"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isVies">
2018-03-01 22:38:14 +00:00
</vn-check>
</vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-horizontal>
2018-03-01 22:38:14 +00:00
<vn-check
vn-one
2018-05-31 11:34:48 +00:00
label="Invoice by mail"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isToBeMailed">
2018-03-01 22:38:14 +00:00
</vn-check>
<vn-check
vn-one
2018-05-31 11:34:48 +00:00
label="Invoice by address"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.hasToInvoiceByAddress">
2018-03-01 22:38:14 +00:00
</vn-check>
2018-05-31 11:34:48 +00:00
</vn-horizontal>
2019-10-09 22:47:29 +00:00
<vn-horizontal>
2018-03-01 22:38:14 +00:00
<vn-check
vn-one
2018-05-31 11:34:48 +00:00
label="Is equalizated"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isEqualizated"
2020-02-04 10:25:15 +00:00
info="In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not."
on-change="$ctrl.onChangeEqualizated(value)">
2018-03-01 22:38:14 +00:00
</vn-check>
2018-05-31 11:34:48 +00:00
<vn-check
vn-one
label="Verified data"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.client.isTaxDataChecked"
2018-11-27 07:48:01 +00:00
vn-acl="salesAssistant">
2018-05-31 11:34:48 +00:00
</vn-check>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
</vn-card>
<vn-button-bar>
2019-09-18 07:41:25 +00:00
<vn-submit label="Save"></vn-submit>
<vn-button label="Undo changes" ng-if="$ctrl.$.form.$dirty" ng-click="watcher.loadOriginalData()"></vn-button>
</vn-button-bar>
</form>
<vn-confirm
2017-11-22 07:59:21 +00:00
vn-id="propagate-isEqualizated"
question="You changed the equalization tax"
message="Do you want to spread the change?"
2019-12-31 09:38:19 +00:00
on-accept="$ctrl.onAcceptEt()">
</vn-confirm>
2020-02-04 10:25:15 +00:00
<vn-confirm
vn-id="confirm-duplicatedClient"
message="Found a client with this data"
on-accept="$ctrl.onAcceptDuplication()">
</vn-confirm>