diff --git a/modules/client/back/methods/client/specs/updateFiscalData.spec.js b/modules/client/back/methods/client/specs/updateFiscalData.spec.js
index a2b8f3d58..288183fb6 100644
--- a/modules/client/back/methods/client/specs/updateFiscalData.spec.js
+++ b/modules/client/back/methods/client/specs/updateFiscalData.spec.js
@@ -29,7 +29,6 @@ describe('Client updateFiscalData', () => {
const ctx = {req: {accessToken: {userId: 5}}};
ctx.args = {postcode: 46680};
-
const client = await app.models.Client.findById(clientId);
expect(client.postcode).toEqual('46460');
diff --git a/modules/client/back/methods/client/updateFiscalData.js b/modules/client/back/methods/client/updateFiscalData.js
index f16b0ef2b..48cc6df88 100644
--- a/modules/client/back/methods/client/updateFiscalData.js
+++ b/modules/client/back/methods/client/updateFiscalData.js
@@ -43,6 +43,18 @@ module.exports = Self => {
arg: 'provinceFk',
type: 'number'
},
+ {
+ arg: 'sageTaxTypeFk',
+ type: 'number'
+ },
+ {
+ arg: 'sageTransactionTypeFk',
+ type: 'number'
+ },
+ {
+ arg: 'transferorFk',
+ type: 'number'
+ },
{
arg: 'hasToInvoiceByAddress',
type: 'boolean'
diff --git a/modules/client/back/model-config.json b/modules/client/back/model-config.json
index cdb54f6b6..340ddeb18 100644
--- a/modules/client/back/model-config.json
+++ b/modules/client/back/model-config.json
@@ -83,6 +83,12 @@
"SmsConfig": {
"dataSource": "vn"
},
+ "SageTaxType": {
+ "dataSource": "vn"
+ },
+ "SageTransactionType": {
+ "dataSource": "vn"
+ },
"TpvError": {
"dataSource": "vn"
},
diff --git a/modules/client/back/models/client.json b/modules/client/back/models/client.json
index 631fce3aa..b4682579a 100644
--- a/modules/client/back/models/client.json
+++ b/modules/client/back/models/client.json
@@ -118,6 +118,18 @@
},
"created": {
"type": "Date"
+ },
+ "sageTaxTypeFk": {
+ "type": "number",
+ "mysql": {
+ "columnName": "taxTypeSageFk"
+ }
+ },
+ "sageTransactionTypeFk": {
+ "type": "number",
+ "mysql": {
+ "columnName": "transactionTypeSageFk"
+ }
}
},
"relations": {
@@ -200,6 +212,20 @@
"type": "hasOne",
"model": "ClaimRatio",
"foreignKey": "clientFk"
+ },
+ "transferor": {
+ "type": "belongsTo",
+ "model": "Client",
+ "foreignKey": "transferorFk"
}
- }
+ },
+ "scopes": {
+ "isActive": {
+ "where": {
+ "isActive": {
+ "neq": false
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/modules/client/back/models/sage-tax-type.json b/modules/client/back/models/sage-tax-type.json
new file mode 100644
index 000000000..858627c05
--- /dev/null
+++ b/modules/client/back/models/sage-tax-type.json
@@ -0,0 +1,33 @@
+{
+ "name": "SageTaxType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "sage.TiposIva"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier",
+ "mysql": {
+ "columnName": "CodigoIva"
+ }
+ },
+ "vat": {
+ "type": "string",
+ "mysql": {
+ "columnName": "Iva"
+ }
+ }
+ },
+ "acls": [
+ {
+ "accessType": "READ",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "ALLOW"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/modules/client/back/models/sage-transaction-type.json b/modules/client/back/models/sage-transaction-type.json
new file mode 100644
index 000000000..dbe8f3b39
--- /dev/null
+++ b/modules/client/back/models/sage-transaction-type.json
@@ -0,0 +1,33 @@
+{
+ "name": "SageTransactionType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "sage.TiposTransacciones"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier",
+ "mysql": {
+ "columnName": "CodigoTransaccion"
+ }
+ },
+ "transaction": {
+ "type": "string",
+ "mysql": {
+ "columnName": "Transaccion"
+ }
+ }
+ },
+ "acls": [
+ {
+ "accessType": "READ",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "ALLOW"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/modules/client/front/fiscal-data/index.html b/modules/client/front/fiscal-data/index.html
index b3789b34a..9cd8f39f4 100644
--- a/modules/client/front/fiscal-data/index.html
+++ b/modules/client/front/fiscal-data/index.html
@@ -18,6 +18,18 @@
data="countries"
order="country">
+