2020-10-30 14:11:45 +00:00
|
|
|
<mg-ajax path="Suppliers/{{patch.params.id}}/updateFiscalData" options="vnPatch"></mg-ajax>
|
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.supplier"
|
|
|
|
id-field="id"
|
|
|
|
form="form"
|
|
|
|
save="patch">
|
|
|
|
</vn-watcher>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Provinces/location"
|
|
|
|
data="provincesLocation"
|
|
|
|
order="name">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Countries"
|
|
|
|
data="countries"
|
|
|
|
order="country">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="SageTaxTypes"
|
|
|
|
data="sageTaxTypes"
|
|
|
|
order="vat">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="SageWithholdings"
|
|
|
|
data="sageWithholdings"
|
|
|
|
order="withholding">
|
|
|
|
</vn-crud-model>
|
2022-04-25 09:51:34 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
2022-04-25 10:23:03 +00:00
|
|
|
url="SupplierActivities"
|
|
|
|
data="supplierActivities">
|
2022-04-25 09:51:34 +00:00
|
|
|
</vn-crud-model>
|
2020-10-30 14:11:45 +00:00
|
|
|
<form name="form" vn-http-submit="watcher.submit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-two
|
|
|
|
vn-focus
|
|
|
|
label="Social name"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="socialName"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.name"
|
2022-04-29 10:13:02 +00:00
|
|
|
info="Only letters, numbers and spaces can be used"
|
2020-11-02 13:30:33 +00:00
|
|
|
required="true"
|
|
|
|
rule>
|
2020-10-30 14:11:45 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Tax number"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="taxNumber"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.nif"
|
2020-11-02 13:30:33 +00:00
|
|
|
required="true"
|
2023-05-05 06:12:38 +00:00
|
|
|
rule>
|
2020-10-30 14:11:45 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2022-10-03 06:48:04 +00:00
|
|
|
<vn-textfield
|
2020-10-30 14:11:45 +00:00
|
|
|
vn-one
|
2020-11-04 10:37:54 +00:00
|
|
|
label="Account"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="account"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.account"
|
2022-10-03 06:48:04 +00:00
|
|
|
insertable="true"
|
2022-09-29 06:08:49 +00:00
|
|
|
max-length="10"
|
2020-10-30 14:11:45 +00:00
|
|
|
rule>
|
2022-10-03 06:48:04 +00:00
|
|
|
</vn-textfield>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Sage tax type"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="sageTaxType"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.sageTaxTypeFk"
|
|
|
|
data="sageTaxTypes"
|
|
|
|
show-field="vat"
|
|
|
|
value-field="id"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Sage withholding"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="sageWithholding"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.sageWithholdingFk"
|
|
|
|
data="sageWithholdings"
|
|
|
|
show-field="withholding"
|
|
|
|
value-field="id"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Sage transaction type"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="sageTransactionType"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.sageTransactionTypeFk"
|
2020-12-30 09:49:02 +00:00
|
|
|
url="SageTransactionTypes"
|
2020-10-30 14:11:45 +00:00
|
|
|
show-field="transaction"
|
|
|
|
value-field="id"
|
2020-12-30 09:49:02 +00:00
|
|
|
search-function="{or: [{id: $search}, {transaction: {like: '%'+ $search +'%'}}]}"
|
2020-12-30 14:39:27 +00:00
|
|
|
order="transaction"
|
2020-10-30 14:11:45 +00:00
|
|
|
rule>
|
2020-12-30 09:49:02 +00:00
|
|
|
<tpl-item>{{id}}: {{transaction}}</tpl-item>
|
2020-10-30 14:11:45 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2022-04-25 09:51:34 +00:00
|
|
|
<vn-horizontal>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Supplier activity"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="supplierActivity"
|
2022-04-25 09:51:34 +00:00
|
|
|
ng-model="$ctrl.supplier.supplierActivityFk"
|
2022-04-25 10:23:03 +00:00
|
|
|
data="supplierActivities"
|
|
|
|
show-field="name"
|
2022-04-25 09:51:34 +00:00
|
|
|
value-field="code"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Healt register"
|
|
|
|
ng-model="$ctrl.supplier.healthRegister"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2020-11-18 10:47:23 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Street"
|
|
|
|
ng-model="$ctrl.supplier.street"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-datalist
|
|
|
|
vn-one
|
2020-10-30 14:11:45 +00:00
|
|
|
label="Postcode"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="postcode"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.postCode"
|
|
|
|
selection="$ctrl.postcode"
|
|
|
|
url="Postcodes/location"
|
|
|
|
fields="['code','townFk']"
|
|
|
|
order="code, townFk"
|
|
|
|
value-field="code"
|
|
|
|
show-field="code"
|
|
|
|
rule>
|
|
|
|
<tpl-item>
|
2022-11-18 08:21:21 +00:00
|
|
|
{{code}} - {{town.name}} ({{town.province.name}},
|
2020-10-30 14:11:45 +00:00
|
|
|
{{town.province.country.country}})
|
|
|
|
</tpl-item>
|
|
|
|
<append>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New postcode"
|
|
|
|
ng-click="postcode.open()"
|
|
|
|
vn-acl="deliveryBoss"
|
|
|
|
vn-acl-action="remove">
|
|
|
|
</vn-icon-button>
|
|
|
|
</append>
|
|
|
|
</vn-datalist>
|
2022-10-26 08:03:13 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-datalist
|
|
|
|
vn-one
|
|
|
|
vn-id="town"
|
2020-10-30 14:11:45 +00:00
|
|
|
label="City"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="city"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.city"
|
|
|
|
selection="$ctrl.town"
|
|
|
|
url="Towns/location"
|
|
|
|
fields="['id', 'name', 'provinceFk']"
|
|
|
|
show-field="name"
|
2020-11-02 13:30:33 +00:00
|
|
|
value-field="name"
|
|
|
|
required="true"
|
|
|
|
rule>
|
2020-10-30 14:11:45 +00:00
|
|
|
<tpl-item>
|
|
|
|
{{name}}, {{province.name}}
|
|
|
|
({{province.country.country}})
|
|
|
|
</tpl-item>
|
|
|
|
</vn-datalist>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
vn-id="province"
|
2020-10-30 14:11:45 +00:00
|
|
|
label="Province"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="province"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.provinceFk"
|
|
|
|
selection="$ctrl.province"
|
|
|
|
data="provincesLocation"
|
|
|
|
fields="['id', 'name', 'countryFk']"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
rule>
|
|
|
|
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2022-10-26 08:03:13 +00:00
|
|
|
</vn-horizontal>
|
2023-07-10 13:17:17 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-address-autocomplete
|
|
|
|
label="Address"
|
2023-07-11 13:29:38 +00:00
|
|
|
post-code="$ctrl.supplier.postCode"
|
2023-07-12 07:40:13 +00:00
|
|
|
town-name="$ctrl.supplier.city"
|
2023-07-11 13:29:38 +00:00
|
|
|
province="$ctrl.supplier.provinceFk"
|
|
|
|
country="$ctrl.supplier.countryFk"
|
2023-07-10 13:17:17 +00:00
|
|
|
/>
|
|
|
|
</vn-horizontal>
|
2022-10-26 08:03:13 +00:00
|
|
|
<vn-horizontal>
|
2023-04-24 10:59:56 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-two
|
|
|
|
vn-id="country"
|
|
|
|
label="Country"
|
2023-05-05 06:12:38 +00:00
|
|
|
vn-name="country"
|
2020-10-30 14:11:45 +00:00
|
|
|
ng-model="$ctrl.supplier.countryFk"
|
|
|
|
data="countries"
|
|
|
|
show-field="country"
|
|
|
|
value-field="id"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
2022-11-18 08:21:21 +00:00
|
|
|
<vn-two class="vn-pl-xs">
|
|
|
|
<vn-check
|
|
|
|
label="Trucker"
|
|
|
|
ng-model="$ctrl.supplier.isTrucker">
|
|
|
|
</vn-check>
|
|
|
|
<vn-check
|
|
|
|
class="vn-ml-lg"
|
|
|
|
label="Vies"
|
2023-04-12 10:03:55 +00:00
|
|
|
info="When activating it, do not enter the country code in the ID field."
|
|
|
|
ng-model="$ctrl.supplier.isVies"
|
|
|
|
>
|
2022-11-18 08:21:21 +00:00
|
|
|
</vn-check>
|
|
|
|
</vn-two>
|
2020-10-30 14:11:45 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-15 16:09:05 +00:00
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Undo changes"
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button>
|
2020-10-30 14:11:45 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|
2023-07-12 07:40:13 +00:00
|
|
|
|