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

153 lines
5.1 KiB
HTML

<mg-ajax path="Clients/{{patch.params.id}}/updateFiscalData" 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 class="vn-pa-lg">
<vn-horizontal>
<vn-textfield
vn-two
vn-focus
label="Social name"
ng-model="$ctrl.client.socialName"
rule
info="You can use letters and spaces">
</vn-textfield>
<vn-textfield
vn-one
label="Tax number"
ng-model="$ctrl.client.fi"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-two
label="Street"
ng-model="$ctrl.client.street"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
vn-id="country"
ng-model="$ctrl.client.countryFk"
url="Countries"
show-field="country"
value-field="id"
label="Country"
rule>
</vn-autocomplete>
<vn-autocomplete
vn-one
vn-id="province"
ng-model="$ctrl.client.provinceFk"
url="Provinces"
where="{countryFk: country.selection.id}"
show-field="name"
value-field="id"
label="Province"
rule>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="City"
ng-model="$ctrl.client.city"
rule>
</vn-textfield>
<vn-textfield
vn-one
label="Postcode"
ng-model="$ctrl.client.postcode"
rule>
</vn-textfield>
<!-- <vn-autocomplete vn-id="town" vn-one
label="City"
url="Towns"
fields="['id', 'name']"
where="{provinceFk: province.selection.id}"
show-field="name"
value-field="name"
ng-model="$ctrl.client.city">
</vn-autocomplete>
<vn-autocomplete vn-id="postcode" vn-one
url="Postcodes/location"
fields="['code', 'townFk']"
ng-model="$ctrl.client.postcode"
search-function="{code: $search}"
where="{townFk: town.selection.id}"
order="code, townFk"
show-field="code"
value-field="code"
label="Postcode">
</vn-autocomplete> -->
</vn-horizontal>
<vn-horizontal>
<vn-check
vn-one
label="Active"
ng-model="$ctrl.client.isActive">
</vn-check>
<vn-check
vn-one
label="Frozen"
ng-model="$ctrl.client.isFreezed">
</vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-check
vn-one
label="Has to invoice"
ng-model="$ctrl.client.hasToInvoice">
</vn-check>
<vn-check
vn-one
label="Vies"
ng-model="$ctrl.client.isVies">
</vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-check
vn-one
label="Invoice by mail"
ng-model="$ctrl.client.isToBeMailed">
</vn-check>
<vn-check
vn-one
label="Invoice by address"
ng-model="$ctrl.client.hasToInvoiceByAddress">
</vn-check>
</vn-horizontal>
<vn-horizontal>
<vn-check
vn-one
label="Is equalizated"
ng-model="$ctrl.client.isEqualizated"
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.">
</vn-check>
<vn-check
vn-one
label="Verified data"
ng-model="$ctrl.client.isTaxDataChecked"
vn-acl="salesAssistant">
</vn-check>
</vn-horizontal>
</vn-card>
<vn-button-bar>
<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
vn-id="propagate-isEqualizated"
question="You changed the equalization tax"
message="Do you want to spread the change?"
on-response="$ctrl.returnDialogEt($response)">
</vn-confirm>