From bbf68a88a792a3e531b1fd463ca6771cbd874bc7 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 9 Feb 2023 10:26:55 +0100 Subject: [PATCH 001/300] feat: sendEmail checkBox and docuware open clientBalanceCreate with default data --- db/changes/230601/00-acl_receiptEmail.sql | 3 + .../back/methods/receipt/receiptEmail.js | 57 +++++++++++++++++++ .../client/back/methods/receipt/receiptPdf.js | 2 +- modules/client/back/models/receipt.js | 1 + .../client/front/balance/create/index.html | 12 ++-- modules/client/front/balance/create/index.js | 35 ++++++++++-- .../client/front/balance/create/locale/es.yml | 4 +- modules/ticket/front/descriptor-menu/index.js | 7 ++- .../email/receipt/assets/css/import.js | 11 ++++ .../templates/email/receipt/attachments.json | 6 ++ print/templates/email/receipt/locale/es.yml | 5 ++ print/templates/email/receipt/receipt.html | 9 +++ print/templates/email/receipt/receipt.js | 15 +++++ 13 files changed, 155 insertions(+), 12 deletions(-) create mode 100644 db/changes/230601/00-acl_receiptEmail.sql create mode 100644 modules/client/back/methods/receipt/receiptEmail.js create mode 100644 print/templates/email/receipt/assets/css/import.js create mode 100644 print/templates/email/receipt/attachments.json create mode 100644 print/templates/email/receipt/locale/es.yml create mode 100644 print/templates/email/receipt/receipt.html create mode 100755 print/templates/email/receipt/receipt.js diff --git a/db/changes/230601/00-acl_receiptEmail.sql b/db/changes/230601/00-acl_receiptEmail.sql new file mode 100644 index 000000000..2de8adf50 --- /dev/null +++ b/db/changes/230601/00-acl_receiptEmail.sql @@ -0,0 +1,3 @@ +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + ('Receipt', 'receiptEmail', '*', 'ALLOW', 'ROLE', 'salesAssistant'); diff --git a/modules/client/back/methods/receipt/receiptEmail.js b/modules/client/back/methods/receipt/receiptEmail.js new file mode 100644 index 000000000..cd529eece --- /dev/null +++ b/modules/client/back/methods/receipt/receiptEmail.js @@ -0,0 +1,57 @@ +const {Email} = require('vn-print'); + +module.exports = Self => { + Self.remoteMethodCtx('receiptEmail', { + description: 'Returns the receipt pdf', + accepts: [ + { + arg: 'id', + type: 'number', + required: true, + description: 'The claim id', + http: {source: 'path'} + }, + { + arg: 'recipient', + type: 'string', + description: 'The recipient email', + required: true, + } + ], + returns: [ + { + arg: 'body', + type: 'file', + root: true + }, { + arg: 'Content-Type', + type: 'String', + http: {target: 'header'} + }, { + arg: 'Content-Disposition', + type: 'String', + http: {target: 'header'} + } + ], + http: { + path: '/:id/receipt-email', + verb: 'POST' + } + }); + + Self.receiptEmail = async(ctx, id) => { + const args = Object.assign({}, ctx.args); + const params = { + recipient: args.recipient, + lang: ctx.req.getLocale() + }; + + delete args.ctx; + for (const param in args) + params[param] = args[param]; + + const email = new Email('receipt', params); + + return email.send(); + }; +}; diff --git a/modules/client/back/methods/receipt/receiptPdf.js b/modules/client/back/methods/receipt/receiptPdf.js index f55e05040..2dfae4e83 100644 --- a/modules/client/back/methods/receipt/receiptPdf.js +++ b/modules/client/back/methods/receipt/receiptPdf.js @@ -8,7 +8,7 @@ module.exports = Self => { arg: 'id', type: 'number', required: true, - description: 'The claim id', + description: 'The receipt id', http: {source: 'path'} }, { diff --git a/modules/client/back/models/receipt.js b/modules/client/back/models/receipt.js index 3118cc239..feb8ca053 100644 --- a/modules/client/back/models/receipt.js +++ b/modules/client/back/models/receipt.js @@ -5,6 +5,7 @@ module.exports = function(Self) { require('../methods/receipt/balanceCompensationEmail')(Self); require('../methods/receipt/balanceCompensationPdf')(Self); require('../methods/receipt/receiptPdf')(Self); + require('../methods/receipt/receiptEmail')(Self); Self.validateBinded('amountPaid', isNotZero, { message: 'Amount cannot be zero', diff --git a/modules/client/front/balance/create/index.html b/modules/client/front/balance/create/index.html index 56e505463..4f9fa07d2 100644 --- a/modules/client/front/balance/create/index.html +++ b/modules/client/front/balance/create/index.html @@ -11,7 +11,7 @@ @@ -80,13 +80,17 @@ - + + - \ No newline at end of file + diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index 68d19209d..57088c31f 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -2,10 +2,12 @@ import ngModule from '../../module'; import Dialog from 'core/components/dialog'; class Controller extends Dialog { - constructor($element, $, $transclude, vnReport) { + constructor($element, $, $transclude, vnReport, vnEmail) { super($element, $, $transclude); this.viewReceipt = true; + this.sendEmail = true; this.vnReport = vnReport; + this.vnEmail = vnEmail; this.receipt = {}; } @@ -24,6 +26,18 @@ class Controller extends Dialog { set clientFk(value) { this.receipt.clientFk = value; + + const filter = { + fields: ['email'], + where: { + id: value + } + }; + + this.$http.get(`Clients/findOne`, {filter}) + .then(res => { + this.receipt.email = res.data.email; + }); } get clientFk() { @@ -65,7 +79,8 @@ class Controller extends Dialog { this.receipt.description.push(accountingType.receiptDescription); if (this.originalDescription) this.receipt.description.push(this.originalDescription); - this.receipt.description.join(', '); + + this.receipt.description = this.receipt.description.join(', ').toString(); this.maxAmount = accountingType && accountingType.maxAmount; @@ -133,10 +148,13 @@ class Controller extends Dialog { return super.responseHandler(response); const exceededAmount = this.receipt.amountPaid > this.maxAmount; - - if (this.bankSelection.accountingType.code == 'cash' && exceededAmount) + const isCash = this.bankSelection.accountingType.code == 'cash'; + if (isCash && exceededAmount) return this.vnApp.showError(this.$t('Amount exceeded', {maxAmount: this.maxAmount})); + if (isCash && this.sendEmail && !this.receipt.email) + return this.vnApp.showError(this.$t('There is no assigned email for this client')); + let receiptId; return this.$http.post(`Clients/${this.clientFk}/createReceipt`, this.receipt) .then(res => { @@ -144,6 +162,13 @@ class Controller extends Dialog { super.responseHandler(response); }) .then(() => this.vnApp.showSuccess(this.$t('Data saved!'))) + .then(() => { + if (!this.sendEmail || !isCash) return; + const params = { + recipient: this.receipt.email + }; + this.vnEmail.send(`Receipts/${receiptId}/receipt-email`, params); + }) .then(() => { if (this.viewReceipt) this.vnReport.show(`Receipts/${receiptId}/receipt-pdf`); @@ -157,7 +182,7 @@ class Controller extends Dialog { } } -Controller.$inject = ['$element', '$scope', '$transclude', 'vnReport']; +Controller.$inject = ['$element', '$scope', '$transclude', 'vnReport', 'vnEmail']; ngModule.vnComponent('vnClientBalanceCreate', { slotTemplate: require('./index.html'), diff --git a/modules/client/front/balance/create/locale/es.yml b/modules/client/front/balance/create/locale/es.yml index 056590966..f8c23afdb 100644 --- a/modules/client/front/balance/create/locale/es.yml +++ b/modules/client/front/balance/create/locale/es.yml @@ -1,2 +1,4 @@ View receipt: Ver recibo -Amount exceeded: Según ley contra el fraude no se puede recibir cobros por importe igual o superior a {{maxAmount}} \ No newline at end of file +Amount exceeded: Según ley contra el fraude no se puede recibir cobros por importe igual o superior a {{maxAmount}} +Send email: Enviar correo +There is no assigned email for this client: No hay correo asignado para este cliente diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index ff029db78..1a88b00d5 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -326,8 +326,13 @@ class Controller extends Section { return this.$http.post(`Docuwares/${this.id}/upload`, {fileCabinet: 'deliveryNote'}) .then(() => { - this.vnApp.showSuccess(this.$t('PDF sent!')); + this.$.balanceCreate.amountPaid = this.ticket.totalWithVat; + this.$.balanceCreate.clientFk = this.ticket.clientFk; + this.$.balanceCreate.description = 'Albaran: '; + this.$.balanceCreate.description += this.ticket.id; + this.$.balanceCreate.show(); + this.vnApp.showSuccess(this.$t('PDF sent!')); }); } } diff --git a/print/templates/email/receipt/assets/css/import.js b/print/templates/email/receipt/assets/css/import.js new file mode 100644 index 000000000..4b4bb7086 --- /dev/null +++ b/print/templates/email/receipt/assets/css/import.js @@ -0,0 +1,11 @@ +const Stylesheet = require(`vn-print/core/stylesheet`); + +const path = require('path'); +const vnPrintPath = path.resolve('print'); + +module.exports = new Stylesheet([ + `${vnPrintPath}/common/css/spacing.css`, + `${vnPrintPath}/common/css/misc.css`, + `${vnPrintPath}/common/css/layout.css`, + `${vnPrintPath}/common/css/email.css`]) + .mergeStyles(); diff --git a/print/templates/email/receipt/attachments.json b/print/templates/email/receipt/attachments.json new file mode 100644 index 000000000..9930596e0 --- /dev/null +++ b/print/templates/email/receipt/attachments.json @@ -0,0 +1,6 @@ +[ + { + "filename": "receipt.pdf", + "component": "receipt" + } +] diff --git a/print/templates/email/receipt/locale/es.yml b/print/templates/email/receipt/locale/es.yml new file mode 100644 index 000000000..95883afaa --- /dev/null +++ b/print/templates/email/receipt/locale/es.yml @@ -0,0 +1,5 @@ +subject: Recibo +title: Recibo +dear: Estimado cliente +description: Ya está disponible el recibo {0}.
+ Puedes descargarlo haciendo clic en el adjunto de este correo. diff --git a/print/templates/email/receipt/receipt.html b/print/templates/email/receipt/receipt.html new file mode 100644 index 000000000..734552014 --- /dev/null +++ b/print/templates/email/receipt/receipt.html @@ -0,0 +1,9 @@ + +
+
+

{{ $t('title') }}

+

{{$t('dear')}},

+

+
+
+
diff --git a/print/templates/email/receipt/receipt.js b/print/templates/email/receipt/receipt.js new file mode 100755 index 000000000..606534f4d --- /dev/null +++ b/print/templates/email/receipt/receipt.js @@ -0,0 +1,15 @@ +const Component = require(`vn-print/core/component`); +const emailBody = new Component('email-body'); + +module.exports = { + name: 'receipt', + components: { + 'email-body': emailBody.build(), + }, + props: { + id: { + type: Number, + required: true + } + } +}; From f496242fcbfa0794e0dfc28330db26c511257d40 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 9 Feb 2023 10:28:37 +0100 Subject: [PATCH 002/300] fix description --- modules/client/back/methods/receipt/receiptPdf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/back/methods/receipt/receiptPdf.js b/modules/client/back/methods/receipt/receiptPdf.js index 2dfae4e83..2bb4059a1 100644 --- a/modules/client/back/methods/receipt/receiptPdf.js +++ b/modules/client/back/methods/receipt/receiptPdf.js @@ -2,7 +2,7 @@ const {Report} = require('vn-print'); module.exports = Self => { Self.remoteMethodCtx('receiptPdf', { - description: 'Returns the receipt pdf', + description: 'Send the receipt pdf to client', accepts: [ { arg: 'id', From e231b0e12b47d12affdd00ad37d2a88fda6007df Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 1 Mar 2023 10:11:22 +0100 Subject: [PATCH 003/300] refs #5237 Added greuge notify --- .../email/greuge-wrong/greuge-wrong.html | 14 +++++++++++++ .../email/greuge-wrong/greuge-wrong.js | 21 +++++++++++++++++++ .../email/greuge-wrong/locale/en.yml | 5 +++++ .../email/greuge-wrong/locale/es.yml | 5 +++++ 4 files changed, 45 insertions(+) create mode 100644 print/templates/email/greuge-wrong/greuge-wrong.html create mode 100644 print/templates/email/greuge-wrong/greuge-wrong.js create mode 100644 print/templates/email/greuge-wrong/locale/en.yml create mode 100644 print/templates/email/greuge-wrong/locale/es.yml diff --git a/print/templates/email/greuge-wrong/greuge-wrong.html b/print/templates/email/greuge-wrong/greuge-wrong.html new file mode 100644 index 000000000..4f0874268 --- /dev/null +++ b/print/templates/email/greuge-wrong/greuge-wrong.html @@ -0,0 +1,14 @@ + + + + + + {{ $t('subject') }} + + +

{{ $t('title') }} {{name}}

+

{{ $t('ticketId') }} {{ticketId}}

+

{{ $t('amount') }} {{amount}}

+

{{ $t('description') }} {{description}}

+ + \ No newline at end of file diff --git a/print/templates/email/greuge-wrong/greuge-wrong.js b/print/templates/email/greuge-wrong/greuge-wrong.js new file mode 100644 index 000000000..ac18c4e9b --- /dev/null +++ b/print/templates/email/greuge-wrong/greuge-wrong.js @@ -0,0 +1,21 @@ +module.exports = { + name: 'greuge-wrong', + props: { + ticketId: { + type: [Number], + required: false + }, + clientId: { + type: [Number], + required: true + }, + description: { + type: [String], + required: true + }, + amount: { + type: [Number], + required: true + } + }, +}; diff --git a/print/templates/email/greuge-wrong/locale/en.yml b/print/templates/email/greuge-wrong/locale/en.yml new file mode 100644 index 000000000..67fb74ccb --- /dev/null +++ b/print/templates/email/greuge-wrong/locale/en.yml @@ -0,0 +1,5 @@ +subject: A wrong greuge has been created +title: A wrong greuge has been created for the client +ticketId: The ticket is +amount: The amount is +description: The description is \ No newline at end of file diff --git a/print/templates/email/greuge-wrong/locale/es.yml b/print/templates/email/greuge-wrong/locale/es.yml new file mode 100644 index 000000000..4282fd3af --- /dev/null +++ b/print/templates/email/greuge-wrong/locale/es.yml @@ -0,0 +1,5 @@ +subject: Se ha creado una gruge anormal +title: Se ha creado una gruge anormal para el cliente +ticketId: El ticket es +amount: El importe es +description: La descripción es \ No newline at end of file From 8679aefb4881b70f46659813e3e71e52cb40846e Mon Sep 17 00:00:00 2001 From: alexandre Date: Fri, 3 Mar 2023 07:36:04 +0100 Subject: [PATCH 004/300] refs #4713 procs deprecated, originalQuantity deleted --- back/methods/collection/setSaleQuantity.js | 3 +-- db/changes/231001/00-saleTracking.sql | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 db/changes/231001/00-saleTracking.sql diff --git a/back/methods/collection/setSaleQuantity.js b/back/methods/collection/setSaleQuantity.js index 4ac3d6d4b..0638539e3 100644 --- a/back/methods/collection/setSaleQuantity.js +++ b/back/methods/collection/setSaleQuantity.js @@ -40,8 +40,7 @@ module.exports = Self => { try { const sale = await models.Sale.findById(saleId, null, myOptions); const saleUpdated = await sale.updateAttributes({ - originalQuantity: sale.quantity, - quantity: quantity + quantity }, myOptions); if (tx) await tx.commit(); diff --git a/db/changes/231001/00-saleTracking.sql b/db/changes/231001/00-saleTracking.sql new file mode 100644 index 000000000..ce9bd8505 --- /dev/null +++ b/db/changes/231001/00-saleTracking.sql @@ -0,0 +1,5 @@ +DROP PROCEDURE `vn`.`sale_setQuantity`; +DROP PROCEDURE `vn`.`collection_updateSale`; +DROP PROCEDURE `vn`.`replaceMovimientosMark`; +DROP PROCEDURE `vn`.`saleTracking_Replace`; +DROP PROCEDURE `vn`.`sale_updateOriginalQuantity`; From 106f96b9a6fb77f5b5b768a8fbe4527eb19cd441 Mon Sep 17 00:00:00 2001 From: alexandre Date: Wed, 8 Mar 2023 12:10:08 +0100 Subject: [PATCH 005/300] refs #4713 fixed front test --- back/methods/collection/spec/setSaleQuantity.spec.js | 2 +- db/changes/231001/.gitkeep | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 db/changes/231001/.gitkeep diff --git a/back/methods/collection/spec/setSaleQuantity.spec.js b/back/methods/collection/spec/setSaleQuantity.spec.js index 63dc3bd2d..516382606 100644 --- a/back/methods/collection/spec/setSaleQuantity.spec.js +++ b/back/methods/collection/spec/setSaleQuantity.spec.js @@ -15,7 +15,7 @@ describe('setSaleQuantity()', () => { await models.Collection.setSaleQuantity(saleId, newQuantity, options); const updateSale = await models.Sale.findById(saleId, null, options); - expect(updateSale.originalQuantity).toEqual(originalSale.quantity); + expect(updateSale.quantity).not.toEqual(originalSale.quantity); expect(updateSale.quantity).toEqual(newQuantity); await tx.rollback(); diff --git a/db/changes/231001/.gitkeep b/db/changes/231001/.gitkeep deleted file mode 100644 index e69de29bb..000000000 From b1c8f51e353d9f3da26a6c0c74934f165287ef63 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 9 Mar 2023 13:41:05 +0100 Subject: [PATCH 006/300] refs: #084200 mod del footer y readapatacion heade --- db/dump/fixtures.sql | 3 +- .../report-footer/assets/css/style.css | 1 + .../report-footer/report-footer.html | 6 +- .../components/report-footer/report-footer.js | 58 ++++++++++++++++++- .../report-header/report-header.html | 2 +- .../components/report-header/report-header.js | 3 +- print/templates/reports/invoice/invoice.html | 2 +- print/templates/reports/invoice/invoice.js | 7 ++- .../templates/reports/invoice/sql/invoice.sql | 2 +- 9 files changed, 76 insertions(+), 8 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 80983a318..2f1c7a806 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -543,7 +543,8 @@ INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif` VALUES (1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'), (2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'), - (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'); + (442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'), + (1381, 'Ornamentales', 'Ornamentales', 7185000440, 1, '03815934E', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'); INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`) VALUES diff --git a/print/core/components/report-footer/assets/css/style.css b/print/core/components/report-footer/assets/css/style.css index 9727e6f8f..b260c1b9f 100644 --- a/print/core/components/report-footer/assets/css/style.css +++ b/print/core/components/report-footer/assets/css/style.css @@ -4,6 +4,7 @@ margin-right: 2cm; font-size: 10px; color: #555; + width: 100%; zoom: 0.65 } diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 1af8df4d4..d71f04ed2 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -5,6 +5,10 @@
{{centerText}}
-

+

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 1ba36b1d7..da1272673 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -1,4 +1,60 @@ +const db = require('../../database'); + module.exports = { name: 'report-footer', - props: ['leftText', 'centerText'] + async serverPrefetch() { + const companyCode = this.companyCode || 'VNL'; + + this.company = await this.getCompany(companyCode); + this.fiscalAddress = await this.getFiscalAddress(companyCode); + }, + computed: { + companyName() { + if (this.company.name) + return this.company.name.toUpperCase(); + + return; + }, + companyGroup() { + if (this.company.groupName) + return this.company.groupName.toLowerCase(); + + return; + }, + companyPhone() { + if (!this.company.phone) return; + + let phone = this.company.phone; + + if (phone.length >= 13) { + const prefix = parseInt(phone.substr(0, 4)); + const number = phone.substr(5, phone.length); + return `+${prefix} ${number}`; + } else + return phone; + } + }, + methods: { + getCompany(code) { + return db.findOne(` + SELECT + s.name, + s.street, + s.postCode, + s.city, + s.phone, + cg.code AS groupName + FROM company c + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`, [code]); + }, + getFiscalAddress(code) { + return db.findOne(` + SELECT nif, register FROM company c + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`, [code]); + } + }, + props: ['leftText', 'companyCode', 'centerText'] }; diff --git a/print/core/components/report-header/report-header.html b/print/core/components/report-header/report-header.html index 0479e5caf..8a3857521 100644 --- a/print/core/components/report-header/report-header.html +++ b/print/core/components/report-header/report-header.html @@ -8,7 +8,7 @@ {{companyName}}. {{company.street}}. {{company.postCode}} {{company.city}}. ☎ {{companyPhone}} - · {{$t('company.contactData')}} + · verdnatura.es - {{company.email}}
CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}
diff --git a/print/core/components/report-header/report-header.js b/print/core/components/report-header/report-header.js index 50c3a1337..376495968 100755 --- a/print/core/components/report-header/report-header.js +++ b/print/core/components/report-header/report-header.js @@ -43,7 +43,8 @@ module.exports = { s.postCode, s.city, s.phone, - cg.code AS groupName + cg.code AS groupName, + c.email FROM company c JOIN companyGroup cg ON cg.id = c.companyGroupFk JOIN supplier s ON s.id = c.id diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index 2d180878a..4056e9ad4 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -240,7 +240,7 @@ -
+
{{$t('observations')}}
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index eaf17527d..a4d96edde 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -11,7 +11,12 @@ module.exports = { this.client = await this.findOneFromDef('client', [this.reference]); this.taxes = await this.rawSqlFromDef(`taxes`, [this.reference]); this.hasIntrastat = await this.findValueFromDef(`hasIntrastat`, [this.reference]); - this.intrastat = await this.rawSqlFromDef(`intrastat`, [this.reference, this.reference, this.reference, this.reference]); + this.intrastat = await this.rawSqlFromDef(`intrastat`, [ + this.reference, + this.reference, + this.reference, + this.reference + ]); this.rectified = await this.rawSqlFromDef(`rectified`, [this.reference]); this.hasIncoterms = await this.findValueFromDef(`hasIncoterms`, [this.reference]); diff --git a/print/templates/reports/invoice/sql/invoice.sql b/print/templates/reports/invoice/sql/invoice.sql index 0f12e4f53..303fa937f 100644 --- a/print/templates/reports/invoice/sql/invoice.sql +++ b/print/templates/reports/invoice/sql/invoice.sql @@ -11,7 +11,7 @@ FROM invoiceOut io JOIN client c ON c.id = io.clientFk JOIN payMethod pm ON pm.id = c.payMethodFk JOIN company cny ON cny.id = io.companyFk - JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk + LEFT JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk LEFT JOIN invoiceOutSerial ios ON ios.code = io.serial LEFT JOIN ticket t ON t.refFk = io.ref WHERE t.refFk = ? \ No newline at end of file From 9e8150dde369af9d4d53780f8c7e9e9072a1d099 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 9 Mar 2023 15:59:46 +0100 Subject: [PATCH 007/300] refs #084200 footnotes dinamico --- print/core/components/report-footer/locale/en.yml | 2 +- print/core/components/report-footer/locale/es.yml | 2 +- print/core/components/report-footer/locale/fr.yml | 2 +- print/core/components/report-footer/locale/pt.yml | 2 +- print/core/components/report-footer/report-footer.html | 4 ++-- print/core/components/report-footer/report-footer.js | 2 ++ 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index 3899f8b98..9a383fb06 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,6 +1,6 @@ numPages: Page of law: - privacy: 'In compliance with the provisions of Organic Law 15/1999, on the + vn-privacy: 'In compliance with the provisions of Organic Law 15/1999, on the Protection of Personal Data, we inform you that the personal data you provide will be included in automated files of VERDNATURA LEVANTE SL, being able at all times to exercise the rights of access, rectification, cancellation and opposition, diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 985c1e17a..c4b538fe4 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,6 +1,6 @@ numPages: Página de law: - privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección + vn-privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index 861ee5684..da6735340 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,6 +1,6 @@ numPages: Page de law: - privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection + vn-privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index 1c343bb4c..b5353a9bc 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,6 +1,6 @@ numPages: Página de law: - privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados + vn-privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index d71f04ed2..e158485f7 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -6,8 +6,8 @@

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index da1272673..c4ae68d7e 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -43,6 +43,8 @@ module.exports = { s.postCode, s.city, s.phone, + c.footnotes, + c.code, cg.code AS groupName FROM company c JOIN companyGroup cg ON cg.id = c.companyGroupFk From 08bda1b05b8229283b487c181598396b0736de61 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 13 Mar 2023 08:09:28 +0100 Subject: [PATCH 008/300] refs #084200 ultimos cambios footnotes --- print/core/components/report-footer/locale/en.yml | 6 ++++-- print/core/components/report-footer/locale/es.yml | 5 +++-- print/core/components/report-footer/locale/fr.yml | 5 +++-- print/core/components/report-footer/locale/pt.yml | 5 +++-- print/core/components/report-footer/report-footer.html | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index 9a383fb06..66f361234 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,8 +1,10 @@ numPages: Page of law: - vn-privacy: 'In compliance with the provisions of Organic Law 15/1999, on the + vnPrivacy: In compliance with the provisions of Organic Law 15/1999, on the Protection of Personal Data, we inform you that the personal data you provide will be included in automated files of VERDNATURA LEVANTE SL, being able at all times to exercise the rights of access, rectification, cancellation and opposition, communicating it in writing to the registered office of the entity. - The purpose of the file is administrative management, accounting, and billing.' + The purpose of the file is administrative management, accounting, and billing. + ornPrivacy: Texto de ejemplo. + diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index c4b538fe4..4fce40b0a 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,8 +1,9 @@ numPages: Página de law: - vn-privacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección + vnPrivacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del - fichero es la gestión administrativa, contabilidad, y facturación. + fichero es la gestión administrativa, contabilidad, y facturación. + ornPrivacy: Texto de ejemplo. \ No newline at end of file diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index da6735340..d7347a813 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,8 +1,9 @@ numPages: Page de law: - vn-privacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection + vnPrivacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation et d'opposition, en communiquant par écrit au siège social de la société. Le dossier - a pour objet la gestion administrative, la comptabilité et la facturation. + a pour objet la gestion administrative, la comptabilité et la facturation. + ornPrivacy: Texto de ejemplo. \ No newline at end of file diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index b5353a9bc..f0d5ec48a 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,8 +1,9 @@ numPages: Página de law: - vn-privacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados + vnPrivacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão - administrativa, contabilidade e facturação. + administrativa, contabilidade e facturação. + ornPrivacy: Texto de ejemplo. \ No newline at end of file diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index e158485f7..6461529a9 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -7,7 +7,7 @@

From b5394d3925251a50e6a20346a8aa1818a1ccf952 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 13 Mar 2023 12:52:41 +0100 Subject: [PATCH 009/300] refs #084200 footer finalizado, web personalizado --- db/changes/231001/00-newTableWeb.sql | 1 + .../components/report-footer/locale/en.yml | 5 +- .../components/report-footer/locale/es.yml | 4 +- .../components/report-footer/locale/fr.yml | 4 +- .../components/report-footer/locale/pt.yml | 4 +- .../report-footer/report-footer.html | 11 +++-- .../components/report-footer/report-footer.js | 46 ++----------------- .../report-header/report-header.html | 2 +- .../components/report-header/report-header.js | 3 +- print/templates/reports/invoice/invoice.html | 2 +- 10 files changed, 22 insertions(+), 60 deletions(-) create mode 100644 db/changes/231001/00-newTableWeb.sql diff --git a/db/changes/231001/00-newTableWeb.sql b/db/changes/231001/00-newTableWeb.sql new file mode 100644 index 000000000..305ebec8b --- /dev/null +++ b/db/changes/231001/00-newTableWeb.sql @@ -0,0 +1 @@ +ALTER TABLE vn.company ADD web varchar(100) NULL; \ No newline at end of file diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index 66f361234..df871913e 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,10 +1,9 @@ numPages: Page of law: - vnPrivacy: In compliance with the provisions of Organic Law 15/1999, on the + vnprivacy: In compliance with the provisions of Organic Law 15/1999, on the Protection of Personal Data, we inform you that the personal data you provide will be included in automated files of VERDNATURA LEVANTE SL, being able at all times to exercise the rights of access, rectification, cancellation and opposition, communicating it in writing to the registered office of the entity. The purpose of the file is administrative management, accounting, and billing. - ornPrivacy: Texto de ejemplo. - + ornprivacy: diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 4fce40b0a..5b72fe78b 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,9 +1,9 @@ numPages: Página de law: - vnPrivacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección + vnprivacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación. - ornPrivacy: Texto de ejemplo. \ No newline at end of file + ornprivacy: \ No newline at end of file diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index d7347a813..a4174105f 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,9 +1,9 @@ numPages: Page de law: - vnPrivacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection + vnprivacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation et d'opposition, en communiquant par écrit au siège social de la société. Le dossier a pour objet la gestion administrative, la comptabilité et la facturation. - ornPrivacy: Texto de ejemplo. \ No newline at end of file + ornprivacy: \ No newline at end of file diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index f0d5ec48a..e9f6e516f 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,9 +1,9 @@ numPages: Página de law: - vnPrivacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados + vnprivacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão administrativa, contabilidade e facturação. - ornPrivacy: Texto de ejemplo. \ No newline at end of file + ornprivacy: \ No newline at end of file diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 6461529a9..447091f9b 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -5,10 +5,11 @@
{{centerText}}
-

+

+

+ diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index c4ae68d7e..4debfce12 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -3,60 +3,20 @@ const db = require('../../database'); module.exports = { name: 'report-footer', async serverPrefetch() { - const companyCode = this.companyCode || 'VNL'; - - this.company = await this.getCompany(companyCode); - this.fiscalAddress = await this.getFiscalAddress(companyCode); - }, - computed: { - companyName() { - if (this.company.name) - return this.company.name.toUpperCase(); - - return; - }, - companyGroup() { - if (this.company.groupName) - return this.company.groupName.toLowerCase(); - - return; - }, - companyPhone() { - if (!this.company.phone) return; - - let phone = this.company.phone; - - if (phone.length >= 13) { - const prefix = parseInt(phone.substr(0, 4)); - const number = phone.substr(5, phone.length); - return `+${prefix} ${number}`; - } else - return phone; - } + this.company = await this.getCompany(this.companyCode); }, methods: { getCompany(code) { return db.findOne(` SELECT - s.name, - s.street, - s.postCode, - s.city, - s.phone, c.footnotes, - c.code, - cg.code AS groupName + c.code FROM company c JOIN companyGroup cg ON cg.id = c.companyGroupFk JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [code]); - }, - getFiscalAddress(code) { - return db.findOne(` - SELECT nif, register FROM company c - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`, [code]); } }, props: ['leftText', 'companyCode', 'centerText'] + }; diff --git a/print/core/components/report-header/report-header.html b/print/core/components/report-header/report-header.html index 8a3857521..22f2068e2 100644 --- a/print/core/components/report-header/report-header.html +++ b/print/core/components/report-header/report-header.html @@ -8,7 +8,7 @@ {{companyName}}. {{company.street}}. {{company.postCode}} {{company.city}}. ☎ {{companyPhone}} - · verdnatura.es - {{company.email}} + · {{company.web}} - {{company.email}}
CIF: {{fiscalAddress.nif}} {{fiscalAddress.register}}
diff --git a/print/core/components/report-header/report-header.js b/print/core/components/report-header/report-header.js index 376495968..d85e2c836 100755 --- a/print/core/components/report-header/report-header.js +++ b/print/core/components/report-header/report-header.js @@ -44,7 +44,8 @@ module.exports = { s.city, s.phone, cg.code AS groupName, - c.email + c.email, + c.web FROM company c JOIN companyGroup cg ON cg.id = c.companyGroupFk JOIN supplier s ON s.id = c.id diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index 4056e9ad4..4a8257c1d 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -3,7 +3,7 @@ -
+
From d05ddef5fae0d3826a2807c151b04b9f6ba88d4f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 22 Mar 2023 14:54:59 +0100 Subject: [PATCH 010/300] refs #084200 primer commit companyI18n --- db/changes/231001/00-newCompanyI18n.sql | 9 +++++++++ .../components/report-footer/report-footer.html | 2 +- .../core/components/report-footer/report-footer.js | 14 +++++++------- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 db/changes/231001/00-newCompanyI18n.sql diff --git a/db/changes/231001/00-newCompanyI18n.sql b/db/changes/231001/00-newCompanyI18n.sql new file mode 100644 index 000000000..0aad8527b --- /dev/null +++ b/db/changes/231001/00-newCompanyI18n.sql @@ -0,0 +1,9 @@ +-- vn.companyI18n definition + +CREATE TABLE `companyI18n` ( + `companyFk` smallint(5) unsigned NOT NULL, + `lang` char(2) CHARACTER SET utf8mb3 NOT NULL, + `footnotes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, + PRIMARY KEY (`companyFk`,`lang`), + CONSTRAINT `companyI18n_FK` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; \ No newline at end of file diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 447091f9b..62d0d9ae6 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -8,7 +8,7 @@

+ v-html="$18n.locale(`${company.footnotes}`)">

diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 4debfce12..5027bcf7a 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -8,13 +8,13 @@ module.exports = { methods: { getCompany(code) { return db.findOne(` - SELECT - c.footnotes, - c.code - FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`, [code]); + SELECT + (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + c.code + FROM company c + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`); } }, props: ['leftText', 'companyCode', 'centerText'] From e1f7ba134363bcac2c0983573385c022317ed161 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 23 Mar 2023 10:37:46 +0100 Subject: [PATCH 011/300] =?UTF-8?q?refs=20#5456=20feat:=20actualizada=20tr?= =?UTF-8?q?aduccion=20en=20castellano=20y=20a=C3=B1adida=20en=20portugues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../email/client-welcome/locale/es.yml | 8 ++-- .../email/client-welcome/locale/pt.yml | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 print/templates/email/client-welcome/locale/pt.yml diff --git a/print/templates/email/client-welcome/locale/es.yml b/print/templates/email/client-welcome/locale/es.yml index 478fd242c..1f3ef3704 100644 --- a/print/templates/email/client-welcome/locale/es.yml +++ b/print/templates/email/client-welcome/locale/es.yml @@ -24,9 +24,11 @@ sections: dicho stock puede variar en función de la fecha seleccionada al configurar el pedido. Es importante CONFIRMAR los pedidos para que la mercancía quede reservada. delivery: El reparto se realiza de lunes a sábado según la zona en la que te encuentres. - Por regla general, los pedidos que se entregan por agencia, deben estar confirmados - y pagados antes de las 17h del día en que se preparan (el día anterior a recibirlos), - aunque esto puede variar si el pedido se envía a través de nuestro reparto y + Los pedidos que se entregan por agencia o por reparto Verdnatura deben estar confirmados y pagados + antes del cierre de la correspondiente ruta el mismo día de preparación del pedido. Este horario + puede variar mucho en función de la ruta y del volumen de pedidos para ese día, por lo que es + recomendable no apurar el tiempo y dejar todo listo a primera hora del día de preparación del pedido. + Aunque esto puede variar si el pedido se envía a través de nuestro reparto y según la zona. howToPay: title: Cómo pagar diff --git a/print/templates/email/client-welcome/locale/pt.yml b/print/templates/email/client-welcome/locale/pt.yml new file mode 100644 index 000000000..708878d8b --- /dev/null +++ b/print/templates/email/client-welcome/locale/pt.yml @@ -0,0 +1,47 @@ +subject: Bem-Vindo à Verdnatura +title: "Damos-te as boas-vindas!" +dearClient: Estimado cliente +clientData: 'Os teus dados para poder comprar no site da Verdnatura (https://shop.verdnatura.es) ou nas apps para iOS e Android, são' +clientId: Identificador de cliente +user: Utilizador +password: Palavra-passe +passwordResetText: Clique em 'Esqueceu a sua palavra-passe?' +sections: + howToBuy: + title: Como fazer uma encomenda + description: 'Para realizar uma encomenda no nosso site, deves configurá-la indicando:' + requeriments: + - Se queres receber a encomenda (por agência ou o nosso próprio transporte) ou se preferes levantá-lo em algum dos nossos armazéns. + - A data que queres receber a encomenda (se preparará no dia anterior). + - A morada de entrega ou armazém aonde queres levantar a encomenda. + stock: No nosso site e apps podes visualizar o estoque disponível de + flor-de-corte, verduras, plantas, acessórios e artificial. Tenha presente que + dito estoque pode variar em função da data escolhida ao configurar a + encomenda. É importante confirmar as encomendas para que a mercadoria fique reservada. + delivery: O transporte se realiza de terça a sabado. As encomendas que se entreguem por agências ou transporte Verdnatura, devem estar confirmadas e pagas até + antes do horário de encerre da correspondente rota do dia de preparação da mesma. Este horario + pode variar muito em função da rota e o volume de encomendas deste dia, pelo qual é + recomendável não esperar à última hora e deixar tudo pronto à primeira hora do dia de preparação. Ainda que isto possa variar se a encomenda se envia através do nosso transporte + dependendo da zona. + howToPay: + title: Como pagar + description: 'As formas de pagamentos admitidas na Verdnatura são:' + options: + - Com cartão através da plataforma de pagamentos (ao confirmar a encomenda ou entrando em Encomendas > Confirmadas). + - Mediante débito automatico mensual, modalidade que deve-se solicitar e tramitar. + toConsider: + title: Coisas a ter em conta + description: A Verdnatura vende EXCLUSIVAMENTE a profissionais, pelo qual deves + remetir-nos o documento de Inicio de Actividade, para comprobar-mos que o vosso CAE + esteja relacionado com o mundo das flores. + claimsPolicy: + title: POLÍTICA DE RECLAMAÇÕES + description: A Verdnatura aceitará as reclamações que se realizem dentro dos + dois dias naturais seguintes à recepção da encomenda (incluindo o mesmo + dia da receção). Passado este prazo não se aceitará nenhuma reclamação. +help: Qualquer dúvida que lhe surja, não hesite em consultá-la estamos + para atender-te! +salesPersonName: Sou o seu asesor comercial e o meu nome é +salesPersonPhone: Telemovel e whatsapp +salesPersonEmail: Correio eletrônico + From 1302665d9860544b12d9b2f8fd8eaa1e13b85e67 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 Mar 2023 10:00:00 +0200 Subject: [PATCH 012/300] refs #5436 showSucces --- modules/claim/front/descriptor/index.js | 4 ++++ modules/claim/front/locale/es.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/claim/front/descriptor/index.js b/modules/claim/front/descriptor/index.js index 0dddadbe1..95eb7e977 100644 --- a/modules/claim/front/descriptor/index.js +++ b/modules/claim/front/descriptor/index.js @@ -17,6 +17,10 @@ class Controller extends Descriptor { } sendPickupOrder() { + if (!this.claim.client.email) { + this.vnApp.showSuccess(this.$t('The client does not have an email')); + return; + } return this.vnEmail.send(`Claims/${this.claim.id}/claim-pickup-email`, { recipient: this.claim.client.email, recipientId: this.claim.clientFk diff --git a/modules/claim/front/locale/es.yml b/modules/claim/front/locale/es.yml index 419e62f56..f6dac2b83 100644 --- a/modules/claim/front/locale/es.yml +++ b/modules/claim/front/locale/es.yml @@ -20,3 +20,4 @@ Photos: Fotos Go to the claim: Ir a la reclamación Sale tracking: Líneas preparadas Ticket tracking: Estados del ticket +The client does not have an email: El cliente no tiene email From aad8fb0a66c4d90f9a045d449cb80198cc3b26e2 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 Mar 2023 13:11:38 +0200 Subject: [PATCH 013/300] refs #084200 i18n --- db/changes/231001/00-newCompanyI18n.sql | 4 +++- print/core/components/report-footer/report-footer.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db/changes/231001/00-newCompanyI18n.sql b/db/changes/231001/00-newCompanyI18n.sql index 0aad8527b..b420fafb3 100644 --- a/db/changes/231001/00-newCompanyI18n.sql +++ b/db/changes/231001/00-newCompanyI18n.sql @@ -1,4 +1,5 @@ -- vn.companyI18n definition +USE vn; CREATE TABLE `companyI18n` ( `companyFk` smallint(5) unsigned NOT NULL, @@ -6,4 +7,5 @@ CREATE TABLE `companyI18n` ( `footnotes` longtext COLLATE utf8mb3_unicode_ci DEFAULT NULL, PRIMARY KEY (`companyFk`,`lang`), CONSTRAINT `companyI18n_FK` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; + diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 62d0d9ae6..957fe106a 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -8,7 +8,7 @@

+ v-html="$i18n.locale(`${company.footnotes}`)">

From 14f8f98fe987e9d5a3a90b81b5dde2d95dd4e48d Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 Mar 2023 15:15:15 +0200 Subject: [PATCH 014/300] refs #084200 findOne --- .../components/report-footer/report-footer.js | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 5027bcf7a..d8bc9ea3d 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -3,20 +3,16 @@ const db = require('../../database'); module.exports = { name: 'report-footer', async serverPrefetch() { - this.company = await this.getCompany(this.companyCode); - }, - methods: { - getCompany(code) { - return db.findOne(` - SELECT - (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, - c.code - FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`); - } + const company = await db.findOne(` + SELECT + (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + c.code + FROM company c + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id + WHERE c.code = ?`, [this.companyCode]); + + this.company = company; }, props: ['leftText', 'companyCode', 'centerText'] - }; From 71220c58f7b27dcb76490141bce945443284caa1 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 29 Mar 2023 12:00:01 +0200 Subject: [PATCH 015/300] refs #084200 inserts --- db/changes/231001/00-insertI18n.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/changes/231001/00-insertI18n.sql diff --git a/db/changes/231001/00-insertI18n.sql b/db/changes/231001/00-insertI18n.sql new file mode 100644 index 000000000..2baa6c9ab --- /dev/null +++ b/db/changes/231001/00-insertI18n.sql @@ -0,0 +1,9 @@ +-- Auto-generated SQL script #202303291013 +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'en','In compliance with the provisions of Organic Law 15/1999, on the Protection of Personal Data, we inform you that the personal data you provide will be included in automated files of VERDNATURA LEVANTE SL, being able at all times to exercise the rights of access, rectification, cancellation and opposition, communicating it in writing to the registered office of the entity. The purpose of the file is administrative management, accounting, and billing.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'es','En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'fr','Conformément aux dispositions de la loi organique 15/1999 sur la protection des données personnelles, nous vous informons que les données personnelles que vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous pouvez à tout moment, exercer les droits d``accès, de rectification, d``annulation et d``opposition, en communiquant par écrit au siège social de la société. Le dossier a pour objet la gestion administrative, la comptabilité et la facturation.'); +INSERT INTO vn.companyI18n (companyFk,lang,footnotes) + VALUES (442,'pt','Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão administrativa, contabilidade e facturação.'); From 9be06c6f4b615277af3cb18154b644a599bee2fe Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 29 Mar 2023 12:07:45 +0200 Subject: [PATCH 016/300] refs #084200 arreglo lang --- print/core/components/report-footer/report-footer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index d8bc9ea3d..be40d376e 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -5,11 +5,12 @@ module.exports = { async serverPrefetch() { const company = await db.findOne(` SELECT - (SELECT ci.footnotes FROM companyI18n ci WHERE ci.companyFk = c.id) AS footnotes, + ci.footnotes, c.code FROM company c - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id + JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = ? + JOIN companyGroup cg ON cg.id = c.companyGroupFk + JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [this.companyCode]); this.company = company; From 5b80951e3eaf1a4734a9894111f914db75cff888 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 3 Apr 2023 03:54:35 +0200 Subject: [PATCH 017/300] refs #5517 vnLog: View improved --- front/core/components/index.js | 1 + front/core/components/json-value/index.html | 1 + front/core/components/json-value/index.js | 56 +++++++ front/core/components/json-value/style.scss | 21 +++ front/core/components/table/style.scss | 21 ++- front/salix/components/log/index.html | 144 ++++++++++------- front/salix/components/log/index.js | 44 +++--- front/salix/components/log/locale/es.yml | 1 + front/salix/components/log/style.scss | 161 ++++++++++++++------ 9 files changed, 313 insertions(+), 137 deletions(-) create mode 100644 front/core/components/json-value/index.html create mode 100644 front/core/components/json-value/index.js create mode 100644 front/core/components/json-value/style.scss diff --git a/front/core/components/index.js b/front/core/components/index.js index 86ab89212..44b8beb45 100644 --- a/front/core/components/index.js +++ b/front/core/components/index.js @@ -32,6 +32,7 @@ import './float-button'; import './icon-menu'; import './icon-button'; import './input-number'; +import './json-value'; import './label-value'; import './range'; import './input-time'; diff --git a/front/core/components/json-value/index.html b/front/core/components/json-value/index.html new file mode 100644 index 000000000..dc1c97709 --- /dev/null +++ b/front/core/components/json-value/index.html @@ -0,0 +1 @@ + diff --git a/front/core/components/json-value/index.js b/front/core/components/json-value/index.js new file mode 100644 index 000000000..c92227ed3 --- /dev/null +++ b/front/core/components/json-value/index.js @@ -0,0 +1,56 @@ +import ngModule from '../../module'; +import Component from 'core/lib/component'; +import './style.scss'; + +const maxStrLen = 25; + +/** + * Displays pretty JSON value. + * + * @property {*} value The value + */ +export default class Controller extends Component { + get value() { + return this._value; + } + + set value(value) { + this._value = value; + const span = this.element; + const formattedValue = this.formatValue(value); + span.textContent = formattedValue; + span.title = typeof value == 'string' && value.length > maxStrLen ? value : ''; + span.className = `js-${value == null ? 'null' : typeof value}`; + } + + formatValue(value) { + if (value == null) return '∅'; + switch (typeof value) { + case 'boolean': + return value ? '✓' : '✗'; + case 'string': + return value.length <= maxStrLen + ? value + : value.substring(0, maxStrLen) + '...'; + case 'object': + if (value instanceof Date) { + const hasZeroTime = + value.getHours() === 0 && + value.getMinutes() === 0 && + value.getSeconds() === 0; + const format = hasZeroTime ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm:ss'; + return this.$filter('date')(value, format); + } else + return value; + default: + return value; + } + } +} + +ngModule.vnComponent('vnJsonValue', { + controller: Controller, + bindings: { + value: ' thead, + & > tbody, + & > tfoot, + & > vn-thead, + & > vn-tbody, + & > vn-tfoot, + & > .vn-thead, + & > .vn-tbody, + & > .vn-tfoot { & > * { display: table-row; @@ -111,14 +116,14 @@ vn-table { color: inherit; } } - a.vn-tbody { + & > a.vn-tbody { &.clickable { @extend %clickable; } } - vn-tbody > *, - .vn-tbody > *, - tbody > * { + & > vn-tbody > *, + & > .vn-tbody > *, + & > tbody > * { border-bottom: $border-thin; &:last-child { diff --git a/front/salix/components/log/index.html b/front/salix/components/log/index.html index 79dfcef8c..1bb8b1705 100644 --- a/front/salix/components/log/index.html +++ b/front/salix/components/log/index.html @@ -9,63 +9,99 @@ limit="20" auto-load="true"> - + - - - - Date - User - Model - Action - Name - Changes - - - - - - {{::log.creationDate | date:'dd/MM/yyyy HH:mm'}} - - - {{::log.user.name || 'System' | translate}} + + + + + + + + + + + + + + + + + + + +
+ Action + + Model + + Date +
+ + {{::log.user.name}} - - - {{::log.changedModel}} - - - {{::$ctrl.actionsText[log.action]}} - - - {{::log.changedModelValue}} - - - - - - - - - - - - - - - - - -
FieldBeforeAfter
{{prop.name}}{{prop.old}}{{prop.new}}
-
- {{::log.description}} + + System + +
+ + {{::log.changedModel}} + + + {{::log.changedModelValue}} + + + #{{::log.changedModelId}} + + + {{::log.creationDate | date:'dd/MM/yyyy HH:mm'}} +
+ + {{::$ctrl.actionsText[log.action]}} + + +
+ + + + +
+ + + {{::prop.name}}: + , + +
+
+ {{::prop.name}}: + + + ← + +
+
+
+ + {{::log.description}} + + + No changes + +
- - - - +
diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index 1c54aa9b8..f1eedf72e 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -13,6 +13,12 @@ export default class Controller extends Section { delete: 'Deletes', select: 'Views' }; + this.actionsClass = { + insert: 'success', + update: 'warning', + delete: 'alert', + select: 'notice' + }; this.filter = { include: [{ relation: 'user', @@ -50,8 +56,8 @@ export default class Controller extends Section { for (const prop of props) { log.props.push({ name: locale[prop] || prop, - old: this.formatValue(oldValues[prop]), - new: this.formatValue(newValues[prop]) + old: this.castValue(oldValues[prop]), + new: this.castValue(newValues[prop]) }); } } @@ -61,31 +67,19 @@ export default class Controller extends Section { return !(this.changedModel && this.changedModelId); } - formatValue(value) { - let type = typeof value; + castValue(value) { + return typeof value === 'string' && validDate.test(value) + ? new Date(value) + : value; + } - if (type === 'string' && validDate.test(value)) { - value = new Date(value); - type = typeof value; - } + mainVal(prop, action) { + return action == 'delete' ? prop.old : prop.new; + } - switch (type) { - case 'boolean': - return value ? '✓' : '✗'; - case 'object': - if (value instanceof Date) { - const hasZeroTime = - value.getHours() === 0 && - value.getMinutes() === 0 && - value.getSeconds() === 0; - const format = hasZeroTime ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm:ss'; - return this.$filter('date')(value, format); - } - else - return value; - default: - return value; - } + toggleAttributes(log, changesEl, force) { + log.expand = force; + changesEl.classList.toggle('expanded', force); } showWorkerDescriptor(event, workerId) { diff --git a/front/salix/components/log/locale/es.yml b/front/salix/components/log/locale/es.yml index d341095d8..142175888 100644 --- a/front/salix/components/log/locale/es.yml +++ b/front/salix/components/log/locale/es.yml @@ -13,3 +13,4 @@ Views: Visualiza System: Sistema note: nota Changes: Cambios +No changes: No hay cambios diff --git a/front/salix/components/log/style.scss b/front/salix/components/log/style.scss index 68cd5a047..00b08df64 100644 --- a/front/salix/components/log/style.scss +++ b/front/salix/components/log/style.scss @@ -1,66 +1,127 @@ @import "variables"; vn-log { - vn-td { - vertical-align: initial !important; + .vn-table { + table-layout: fixed; + + & > thead, + & > tbody { + & > tr { + td, th { + &:first-child { + padding-left: 16px; + } + &:last-child { + padding-right: 16px; + } + } + } + } + & > thead > tr > th { + max-width: initial; + } + & > tbody { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); + + &:last-child { + border-bottom: none; + } + & > tr { + border-bottom: none; + height: initial; + + & > td { + padding-top: 16px; + padding-bottom: 16px; + + &.action > .chip { + display: inline-block; + } + } + &.change-header > td { + padding-bottom: 0; + } + &.change-detail > td { + padding-top: 6px; + vertical-align: top; + } + } + } + th, td { + &.action, + &.user { + width: 90px; + } + &.date { + width: 120px; + text-align: right; + } + } + } + .model-value { + font-style: italic; + color: #c7bd2b; + } + .model-id { + color: $color-font-secondary; + font-size: .9em; } .changes { - display: none; - } - .label { + overflow: hidden; + background-color: rgba(255, 255, 255, .05); + border-radius: 4px; color: $color-font-secondary; - } - .value { - color: $color-font; - } + transition: max-height 150ms ease-in-out; + max-height: 28px; + position: relative; - @media screen and (max-width: 1570px) { - vn-table .expendable { + & > .expand-button, + & > .shrink-button { display: none; } - .changes { - padding-top: 10px; - display: block; + &.props { + padding-right: 24px; + + & > .expand-button, + & > .shrink-button { + position: absolute; + top: 6px; + right: 8px; + font-size: inherit; + float: right; + cursor: pointer; + } + & > .expand-button { + display: block; + } + &.expanded { + max-height: 500px; + padding-right: 0; + + & > .changes-wrapper { + text-overflow: initial; + white-space: initial; + } + & > .shrink-button { + display: block; + } + & > .expand-button { + display: none; + } + } } - } - .attributes { - width: 100%; + & > .changes-wrapper { + padding: 4px 6px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; - tr { - height: 10px; - - & > td { - padding: 2px; + & > .no-changes { + font-style: italic; } - & > td.field, - & > th.field { - width: 20%; - color: gray; - } - & > td.before, - & > th.before, - & > td.after, - & > th.after { - width: 40%; - white-space: pre-line; + .json-field { + text-transform: capitalize; } } } } -.ellipsis { - white-space: nowrap; - overflow: hidden; - max-width: 400px; - text-overflow: ellipsis; - display: inline-block; -} -.no-ellipsize, -[no-ellipsize] { - text-overflow: ''; - white-space: normal; - overflow: auto; -} -.alignSpan { - overflow: hidden; - display: inline-block; -} From 12074bd0f4cf896b9cf9dc7a415e0f148b33449c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 3 Apr 2023 04:13:09 +0200 Subject: [PATCH 018/300] refs #5517 vnLog: watchers fixes --- front/salix/components/log/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/salix/components/log/index.html b/front/salix/components/log/index.html index 1bb8b1705..8174e19cc 100644 --- a/front/salix/components/log/index.html +++ b/front/salix/components/log/index.html @@ -74,15 +74,15 @@ {{::prop.name}}: - , + ,
{{::prop.name}}: - + - ← + ←
@@ -91,7 +91,7 @@ class="description"> {{::log.description}} - No changes From 7f18366ece0d61df0aaf92607966bf0f8c257036 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 3 Apr 2023 18:40:50 +0200 Subject: [PATCH 019/300] refs #5517 Relative dates, style fixes --- front/salix/components/log/index.html | 4 ++-- front/salix/components/log/index.js | 25 ++++++++++++++++++++++++ front/salix/components/log/locale/es.yml | 2 ++ front/salix/components/log/style.scss | 8 +++++++- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/front/salix/components/log/index.html b/front/salix/components/log/index.html index 8174e19cc..14a3fbe61 100644 --- a/front/salix/components/log/index.html +++ b/front/salix/components/log/index.html @@ -48,8 +48,8 @@ #{{::log.changedModelId}} - - {{::log.creationDate | date:'dd/MM/yyyy HH:mm'}} + + {{::$ctrl.relativeDate(log.creationDate)}} diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index f1eedf72e..63b4cedf4 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -33,6 +33,10 @@ export default class Controller extends Section { }, }], }; + this.dateFilter = this.$filter('date'); + this.lang = this.$translate.use(); + this.today = Date.vnNew(); + this.today.setHours(0, 0, 0, 0); } get logs() { @@ -82,6 +86,27 @@ export default class Controller extends Section { changesEl.classList.toggle('expanded', force); } + relativeDate(dateVal) { + const date = new Date(dateVal); + const dateZeroTime = new Date(dateVal); + dateZeroTime.setHours(0, 0, 0, 0); + const diff = Math.trunc((this.today.getTime() - dateZeroTime.getTime()) / (1000 * 3600 * 24)); + + let format; + if (diff == 0) + format = `'${this.$t('today')}'`; + else if (diff == 1) + format = `'${this.$t('yesterday')}'`; + else if (diff >= 2 && diff <= 5) + format = `'${date.toLocaleDateString(this.lang, {weekday: 'short'})}'`; + else if (this.today.getFullYear() == date.getFullYear()) + format = `dd/MM`; + else + format = `dd/MM/yyyy`; + + return this.dateFilter(date, `${format} HH:mm`); + } + showWorkerDescriptor(event, workerId) { if (!workerId) return; this.$.workerDescriptor.show(event.target, workerId); diff --git a/front/salix/components/log/locale/es.yml b/front/salix/components/log/locale/es.yml index 142175888..385b42147 100644 --- a/front/salix/components/log/locale/es.yml +++ b/front/salix/components/log/locale/es.yml @@ -14,3 +14,5 @@ System: Sistema note: nota Changes: Cambios No changes: No hay cambios +today: hoy +yesterday: ayer diff --git a/front/salix/components/log/style.scss b/front/salix/components/log/style.scss index 00b08df64..1573218f4 100644 --- a/front/salix/components/log/style.scss +++ b/front/salix/components/log/style.scss @@ -37,6 +37,12 @@ vn-log { &.action > .chip { display: inline-block; } + &.date { + color: $color-font-secondary; + text-transform: capitalize; + font-style: italic; + font-size: .9em; + } } &.change-header > td { padding-bottom: 0; @@ -53,7 +59,7 @@ vn-log { width: 90px; } &.date { - width: 120px; + width: 115px; text-align: right; } } From ae22c58ecbe2c7c40797797b7834f5db815efb19 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 3 Apr 2023 18:48:40 +0200 Subject: [PATCH 020/300] refs #5517 JSON value component code clean, max str len increased --- front/core/components/json-value/index.html | 1 - front/core/components/json-value/index.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 front/core/components/json-value/index.html diff --git a/front/core/components/json-value/index.html b/front/core/components/json-value/index.html deleted file mode 100644 index dc1c97709..000000000 --- a/front/core/components/json-value/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/front/core/components/json-value/index.js b/front/core/components/json-value/index.js index c92227ed3..02c693e54 100644 --- a/front/core/components/json-value/index.js +++ b/front/core/components/json-value/index.js @@ -2,7 +2,7 @@ import ngModule from '../../module'; import Component from 'core/lib/component'; import './style.scss'; -const maxStrLen = 25; +const maxStrLen = 50; /** * Displays pretty JSON value. From 3cc61916961dae2f06101df1af6b26bb6ef291b7 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 4 Apr 2023 19:01:19 +0200 Subject: [PATCH 021/300] refs #5517 Show abr month name in relative date --- front/salix/components/log/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index 63b4cedf4..bb5ff691f 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -100,7 +100,7 @@ export default class Controller extends Section { else if (diff >= 2 && diff <= 5) format = `'${date.toLocaleDateString(this.lang, {weekday: 'short'})}'`; else if (this.today.getFullYear() == date.getFullYear()) - format = `dd/MM`; + format = `d '${date.toLocaleDateString(this.lang, {month: 'short'})}'`; else format = `dd/MM/yyyy`; From 1e71f7487a01620423f4ceda243aa280ccad2980 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 5 Apr 2023 11:16:07 +0200 Subject: [PATCH 022/300] refs #084200 I18n footer --- print/core/components/report-footer/locale/en.yml | 10 +--------- print/core/components/report-footer/locale/es.yml | 10 +--------- print/core/components/report-footer/locale/fr.yml | 8 -------- print/core/components/report-footer/locale/pt.yml | 8 -------- print/core/components/report-footer/report-footer.html | 8 +++++--- print/core/components/report-footer/report-footer.js | 2 +- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/print/core/components/report-footer/locale/en.yml b/print/core/components/report-footer/locale/en.yml index df871913e..8ca14b4d7 100644 --- a/print/core/components/report-footer/locale/en.yml +++ b/print/core/components/report-footer/locale/en.yml @@ -1,9 +1 @@ -numPages: Page of -law: - vnprivacy: In compliance with the provisions of Organic Law 15/1999, on the - Protection of Personal Data, we inform you that the personal data you provide - will be included in automated files of VERDNATURA LEVANTE SL, being able at all - times to exercise the rights of access, rectification, cancellation and opposition, - communicating it in writing to the registered office of the entity. - The purpose of the file is administrative management, accounting, and billing. - ornprivacy: +numPages: Page of \ No newline at end of file diff --git a/print/core/components/report-footer/locale/es.yml b/print/core/components/report-footer/locale/es.yml index 5b72fe78b..5ac6544ad 100644 --- a/print/core/components/report-footer/locale/es.yml +++ b/print/core/components/report-footer/locale/es.yml @@ -1,9 +1 @@ -numPages: Página de -law: - vnprivacy: En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección - de Datos de Carácter Personal, le comunicamos que los datos personales que facilite - se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en - todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, - comunicándolo por escrito al domicilio social de la entidad. La finalidad del - fichero es la gestión administrativa, contabilidad, y facturación. - ornprivacy: \ No newline at end of file +numPages: Página de \ No newline at end of file diff --git a/print/core/components/report-footer/locale/fr.yml b/print/core/components/report-footer/locale/fr.yml index a4174105f..6fb644b2c 100644 --- a/print/core/components/report-footer/locale/fr.yml +++ b/print/core/components/report-footer/locale/fr.yml @@ -1,9 +1 @@ numPages: Page de -law: - vnprivacy: Conformément aux dispositions de la loi organique 15/1999 sur la protection - des données personnelles, nous vous informons que les données personnelles que - vous fournissez seront incluses dans des dossiers. VERDNATURA LEVANTE S.L., vous - pouvez à tout moment, exercer les droits d'accès, de rectification, d'annulation - et d'opposition, en communiquant par écrit au siège social de la société. Le dossier - a pour objet la gestion administrative, la comptabilité et la facturation. - ornprivacy: \ No newline at end of file diff --git a/print/core/components/report-footer/locale/pt.yml b/print/core/components/report-footer/locale/pt.yml index e9f6e516f..9354ba3e9 100644 --- a/print/core/components/report-footer/locale/pt.yml +++ b/print/core/components/report-footer/locale/pt.yml @@ -1,9 +1 @@ numPages: Página de -law: - vnprivacy: Em cumprimento do disposto na lei Orgânica 15/1999, de Protecção de Dados - de Carácter Pessoal, comunicamos que os dados pessoais que facilite se incluirão - nos ficheiros automatizados de VERDNATURA LEVANTE S.L., podendo em todo momento - exercer os direitos de acesso, rectificação, cancelação e oposição, comunicando - por escrito ao domicílio social da entidade. A finalidade do ficheiro é a gestão - administrativa, contabilidade e facturação. - ornprivacy: \ No newline at end of file diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index 957fe106a..ffef3e435 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -1,3 +1,5 @@ + +
+ diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index be40d376e..bb1ef2213 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -8,7 +8,7 @@ module.exports = { ci.footnotes, c.code FROM company c - JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = ? + JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1) JOIN companyGroup cg ON cg.id = c.companyGroupFk JOIN supplier s ON s.id = c.id WHERE c.code = ?`, [this.companyCode]); From 014998952e67a97e2eb99a1d2d53057cd0acf00f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 5 Apr 2023 14:39:51 +0200 Subject: [PATCH 023/300] refs #084200 recipientId --- .../report-footer/report-footer.html | 8 +++---- .../components/report-footer/report-footer.js | 22 +++++++++---------- print/templates/reports/invoice/invoice.html | 2 ++ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/print/core/components/report-footer/report-footer.html b/print/core/components/report-footer/report-footer.html index ffef3e435..67b5f3cd0 100644 --- a/print/core/components/report-footer/report-footer.html +++ b/print/core/components/report-footer/report-footer.html @@ -1,5 +1,3 @@ - -
- + diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index bb1ef2213..0eaab8ce4 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -1,19 +1,17 @@ +/* eslint-disable no-tabs */ const db = require('../../database'); module.exports = { name: 'report-footer', async serverPrefetch() { - const company = await db.findOne(` - SELECT - ci.footnotes, - c.code - FROM company c - JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1) - JOIN companyGroup cg ON cg.id = c.companyGroupFk - JOIN supplier s ON s.id = c.id - WHERE c.code = ?`, [this.companyCode]); - - this.company = company; + this.company = await db.findOne( + `SELECT + ci.footnotes + FROM companyI18n ci + JOIN company c ON c.id = ci.companyFk + WHERE c.code = ? AND ci.lang = (SELECT lang FROM account.user WHERE id = ?)`, + [this.companyCode, this.recipientId]); }, - props: ['leftText', 'companyCode', 'centerText'] + + props: ['leftText', 'companyCode', 'recipientId', 'centerText'] }; diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index 4a8257c1d..771229c01 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -259,7 +259,9 @@ v-bind:company-code="invoice.companyCode" v-bind:left-text="$t('invoiceRef', [invoice.ref])" v-bind:center-text="client.socialName" + v-bind:recipient-id="client.id" v-bind="$props" + > From f7191f0f7fc7e4e054d3de1cce6e2fc1530c4f00 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 6 Apr 2023 08:37:26 +0200 Subject: [PATCH 024/300] refs #5517 log relativeDate function fixes --- front/salix/components/log/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index bb5ff691f..94b600325 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -97,7 +97,7 @@ export default class Controller extends Section { format = `'${this.$t('today')}'`; else if (diff == 1) format = `'${this.$t('yesterday')}'`; - else if (diff >= 2 && diff <= 5) + else if (diff < 7) format = `'${date.toLocaleDateString(this.lang, {weekday: 'short'})}'`; else if (this.today.getFullYear() == date.getFullYear()) format = `d '${date.toLocaleDateString(this.lang, {month: 'short'})}'`; From 9f4d027014e206ef8b281354f94550bac4d2046f Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 6 Apr 2023 15:36:14 +0200 Subject: [PATCH 025/300] refs #5316 sql --- db/changes/231401/00-kkearEntryNotes.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/changes/231401/00-kkearEntryNotes.sql diff --git a/db/changes/231401/00-kkearEntryNotes.sql b/db/changes/231401/00-kkearEntryNotes.sql new file mode 100644 index 000000000..ff5c7ce29 --- /dev/null +++ b/db/changes/231401/00-kkearEntryNotes.sql @@ -0,0 +1 @@ +ALTER TABLE `vn`.`entry` DROP COLUMN `notes`; \ No newline at end of file From d7d4b9515eef07db6b9af3d00baa13a5356fe1e7 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 6 Apr 2023 17:02:45 +0200 Subject: [PATCH 026/300] refs #5517 json value and date format fixes --- front/core/components/json-value/index.js | 71 +++++++++++++-------- front/core/components/json-value/style.scss | 13 ++-- front/salix/components/log/index.js | 2 +- 3 files changed, 53 insertions(+), 33 deletions(-) diff --git a/front/core/components/json-value/index.js b/front/core/components/json-value/index.js index 02c693e54..6bf0ae4aa 100644 --- a/front/core/components/json-value/index.js +++ b/front/core/components/json-value/index.js @@ -15,36 +15,53 @@ export default class Controller extends Component { } set value(value) { + const wasEmpty = this._value === undefined; this._value = value; - const span = this.element; - const formattedValue = this.formatValue(value); - span.textContent = formattedValue; - span.title = typeof value == 'string' && value.length > maxStrLen ? value : ''; - span.className = `js-${value == null ? 'null' : typeof value}`; - } - formatValue(value) { - if (value == null) return '∅'; - switch (typeof value) { - case 'boolean': - return value ? '✓' : '✗'; - case 'string': - return value.length <= maxStrLen - ? value - : value.substring(0, maxStrLen) + '...'; - case 'object': - if (value instanceof Date) { - const hasZeroTime = - value.getHours() === 0 && - value.getMinutes() === 0 && - value.getSeconds() === 0; - const format = hasZeroTime ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm:ss'; - return this.$filter('date')(value, format); - } else - return value; - default: - return value; + let text; + let cssClass; + const type = typeof value; + + if (value == null) { + text = '∅'; + cssClass = 'null'; + } else { + cssClass = type; + switch (type) { + case 'boolean': + text = value ? '✓' : '✗'; + cssClass = value ? 'true' : 'false'; + break; + case 'string': + text = value.length <= maxStrLen + ? value + : value.substring(0, maxStrLen) + '...'; + break; + case 'object': + if (value instanceof Date) { + const hasZeroTime = + value.getHours() === 0 && + value.getMinutes() === 0 && + value.getSeconds() === 0; + const format = hasZeroTime ? 'dd/MM/yyyy' : 'dd/MM/yyyy HH:mm:ss'; + text = this.$filter('date')(value, format); + } else + text = value; + break; + default: + text = value; + } } + + const el = this.element; + el.textContent = text; + el.title = type == 'string' && value.length > maxStrLen ? value : ''; + + cssClass = `json-${cssClass}`; + if (wasEmpty) + el.classList.add(cssClass); + else + el.classList.replace(this.className, cssClass); } } diff --git a/front/core/components/json-value/style.scss b/front/core/components/json-value/style.scss index cd9b5fae6..2d6c4023c 100644 --- a/front/core/components/json-value/style.scss +++ b/front/core/components/json-value/style.scss @@ -1,20 +1,23 @@ vn-json-value { display: inline; - &.js-string { + &.json-string { color: #d172cc; } - &.js-object { + &.json-object { /*color: #d1a572;*/ color: #d172cc; } - &.js-number { + &.json-number { color: #85d0ff; } - &.js-boolean { + &.json-true { color: #7dc489; } - &.js-null { + &.json-false { + color: #c74949; + } + &.json-null { color: #cd7c7c; font-style: italic; } diff --git a/front/salix/components/log/index.js b/front/salix/components/log/index.js index 94b600325..d768b2195 100644 --- a/front/salix/components/log/index.js +++ b/front/salix/components/log/index.js @@ -97,7 +97,7 @@ export default class Controller extends Section { format = `'${this.$t('today')}'`; else if (diff == 1) format = `'${this.$t('yesterday')}'`; - else if (diff < 7) + else if (diff > 1 && diff < 7) format = `'${date.toLocaleDateString(this.lang, {weekday: 'short'})}'`; else if (this.today.getFullYear() == date.getFullYear()) format = `d '${date.toLocaleDateString(this.lang, {month: 'short'})}'`; From d21ab7a5a7f4f8db7922000a11b82321835dc4a3 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 11 Apr 2023 10:32:21 +0200 Subject: [PATCH 027/300] refs #5316 primer kkeo --- db/dump/fixtures.sql | 18 +++++++++--------- e2e/helpers/selectors.js | 2 +- e2e/paths/12-entry/05_basicData.spec.js | 10 +++++----- modules/entry/back/methods/entry/filter.js | 1 - modules/entry/back/models/entry.json | 6 +++--- modules/entry/front/basic-data/index.html | 4 ++-- modules/entry/front/index/locale/es.yml | 2 +- modules/entry/front/routes.json | 2 +- modules/entry/front/summary/index.html | 4 ++-- modules/travel/front/summary/index.html | 4 ++-- .../reports/entry-order/entry-order.html | 4 ++-- 11 files changed, 28 insertions(+), 29 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 9006c6676..e9ad6d974 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1407,16 +1407,16 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO (7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1), (8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2); -INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`) +INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `evaNotes`) VALUES - (1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, '', ''), - (2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'this is the note two', 'observation two'), - (3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'this is the note three', 'observation three'), - (4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'this is the note four', 'observation four'), - (5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'this is the note five', 'observation five'), - (6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'this is the note six', 'observation six'), - (7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'), - (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, '', ''); + (1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, ''), + (2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'observation two'), + (3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'observation three'), + (4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'observation four'), + (5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'observation five'), + (6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'observation six'), + (7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'observation seven'), + (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, ''); INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`) VALUES diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 32a60a4e2..5f86443ab 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -1240,7 +1240,7 @@ export default { entryBasicData: { reference: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.reference"]', invoiceNumber: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.invoiceNumber"]', - notes: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.notes"]', + // notes: 'vn-entry-basic-data vn-textfield[ng-model="$ctrl.entry.notes"]', observations: 'vn-entry-basic-data vn-textarea[ng-model="$ctrl.entry.observation"]', supplier: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.supplierFk"]', currency: 'vn-entry-basic-data vn-autocomplete[ng-model="$ctrl.entry.currencyFk"]', diff --git a/e2e/paths/12-entry/05_basicData.spec.js b/e2e/paths/12-entry/05_basicData.spec.js index 3b5f40c35..eec00ca96 100644 --- a/e2e/paths/12-entry/05_basicData.spec.js +++ b/e2e/paths/12-entry/05_basicData.spec.js @@ -20,7 +20,7 @@ describe('Entry basic data path', () => { it('should edit the basic data', async() => { await page.write(selectors.entryBasicData.reference, 'new movement 8'); await page.write(selectors.entryBasicData.invoiceNumber, 'new movement 8'); - await page.write(selectors.entryBasicData.notes, 'new notes'); + // await page.write(selectors.entryBasicData.notes, 'new notes'); await page.write(selectors.entryBasicData.observations, ' edited'); await page.autocompleteSearch(selectors.entryBasicData.supplier, 'Plants nick'); await page.autocompleteSearch(selectors.entryBasicData.currency, 'eur'); @@ -53,11 +53,11 @@ describe('Entry basic data path', () => { expect(result).toEqual('new movement 8'); }); - it('should confirm the note was edited', async() => { - const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value'); + // it('should confirm the note was edited', async() => { + // const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value'); - expect(result).toEqual('new notes'); - }); + // expect(result).toEqual('new notes'); + // }); it('should confirm the observation was edited', async() => { const result = await page.waitToGetProperty(selectors.entryBasicData.observations, 'value'); diff --git a/modules/entry/back/methods/entry/filter.js b/modules/entry/back/methods/entry/filter.js index e90043074..1cd12b737 100644 --- a/modules/entry/back/methods/entry/filter.js +++ b/modules/entry/back/methods/entry/filter.js @@ -158,7 +158,6 @@ module.exports = Self => { e.invoiceNumber, e.isBooked, e.isExcludedFromAvailable, - e.notes, e.evaNotes AS observation, e.isConfirmed, e.isOrdered, diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index 5aa175758..7747b81f9 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -31,9 +31,9 @@ "isExcludedFromAvailable": { "type": "boolean" }, - "notes": { - "type": "string" - }, + // "notes": { + // "type": "string" + // }, "isConfirmed": { "type": "boolean" }, diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index 68a65e890..6fd23a4f7 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -52,13 +52,13 @@ rule vn-focus> - - + --> - - + --> diff --git a/modules/travel/front/summary/index.html b/modules/travel/front/summary/index.html index 113128e0e..c19a075fc 100644 --- a/modules/travel/front/summary/index.html +++ b/modules/travel/front/summary/index.html @@ -100,12 +100,12 @@ {{entry.pallet}} {{entry.m3}} - - + --> -
+