From 01d3c23cf0bcb3d716be9e7a8a7b90fdfe75968b Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 9 Nov 2023 11:57:52 +0100 Subject: [PATCH] ref #5914 renameTable --- db/changes/234601/00-transferInvoice.sql | 2 +- .../invoiceOut/back/methods/invoiceOut/transferInvoice.js | 4 ++-- modules/invoiceOut/back/model-config.json | 2 +- ...us-invoice-type-477.json => sii-type-invoice-out.json} | 7 +++++-- modules/invoiceOut/front/descriptor-menu/index.html | 8 ++++---- modules/invoiceOut/front/descriptor-menu/index.js | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) rename modules/invoiceOut/back/models/{cplus-invoice-type-477.json => sii-type-invoice-out.json} (68%) diff --git a/db/changes/234601/00-transferInvoice.sql b/db/changes/234601/00-transferInvoice.sql index 7a9890ae4..d9ae39464 100644 --- a/db/changes/234601/00-transferInvoice.sql +++ b/db/changes/234601/00-transferInvoice.sql @@ -1,6 +1,6 @@ INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) VALUES ('CplusRectificationType', '*', 'READ', 'ALLOW', 'ROLE', 'administrative'), - ('CplusInvoiceType477', '*', 'READ', 'ALLOW', 'ROLE', 'administrative'), + ('SiiTypeInvoiceOut', '*', 'READ', 'ALLOW', 'ROLE', 'administrative'), ('InvoiceCorrectionType', '*', 'READ', 'ALLOW', 'ROLE', 'administrative'), ('InvoiceOut', 'transferInvoice', 'WRITE', 'ALLOW', 'ROLE', 'administrative'); diff --git a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js index 8a0609b8d..dde535c99 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js +++ b/modules/invoiceOut/back/methods/invoiceOut/transferInvoice.js @@ -27,7 +27,7 @@ module.exports = Self => { required: true }, { - arg: 'cplusInvoiceType477Id', + arg: 'siiTypeInvoiceOutId', type: 'number', required: true }, @@ -93,7 +93,7 @@ module.exports = Self => { correctingFk: invoiceId, correctedFk: args.id, cplusRectificationTypeFk: args.cplusRectificationId, - cplusInvoiceType477Fk: args.cplusInvoiceType477Id, + siiTypeInvoiceOutFk: args.siiTypeInvoiceOutId, invoiceCorrectionTypeFk: args.invoiceCorrectionTypeId }, myOptions); diff --git a/modules/invoiceOut/back/model-config.json b/modules/invoiceOut/back/model-config.json index 23246893b..9c7512429 100644 --- a/modules/invoiceOut/back/model-config.json +++ b/modules/invoiceOut/back/model-config.json @@ -41,7 +41,7 @@ "InvoiceCorrection": { "dataSource": "vn" }, - "CplusInvoiceType477": { + "SiiTypeInvoiceOut": { "dataSource": "vn" } } diff --git a/modules/invoiceOut/back/models/cplus-invoice-type-477.json b/modules/invoiceOut/back/models/sii-type-invoice-out.json similarity index 68% rename from modules/invoiceOut/back/models/cplus-invoice-type-477.json rename to modules/invoiceOut/back/models/sii-type-invoice-out.json index 840a9a7e4..89f01bd74 100644 --- a/modules/invoiceOut/back/models/cplus-invoice-type-477.json +++ b/modules/invoiceOut/back/models/sii-type-invoice-out.json @@ -1,9 +1,9 @@ { - "name": "CplusInvoiceType477", + "name": "SiiTypeInvoiceOut", "base": "VnModel", "options": { "mysql": { - "table": "cplusInvoiceType477" + "table": "siiTypeInvoiceOut" } }, "properties": { @@ -12,6 +12,9 @@ "type": "number", "description": "Identifier" }, + "code": { + "type": "string" + }, "description": { "type": "string" } diff --git a/modules/invoiceOut/front/descriptor-menu/index.html b/modules/invoiceOut/front/descriptor-menu/index.html index 7d465f4ea..d7537bc0a 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.html +++ b/modules/invoiceOut/front/descriptor-menu/index.html @@ -6,8 +6,8 @@ + url="SiiTypeInvoiceOuts" + data="siiTypeInvoiceOuts"> diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js index 7d2644158..d3862a753 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -132,7 +132,7 @@ class Controller extends Section { ref: this.invoiceOut.ref, newClientFk: this.invoiceOut.client.id, cplusRectificationId: this.cplusRectificationType, - cplusInvoiceType477Id: this.cplusInvoiceType477, + siiTypeInvoiceOutId: this.siiTypeInvoiceOut, invoiceCorrectionTypeId: this.invoiceCorrectionType }; this.$http.post(`InvoiceOuts/transferInvoice`, params).then(res => {