From e231b0e12b47d12affdd00ad37d2a88fda6007df Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 1 Mar 2023 10:11:22 +0100 Subject: [PATCH 01/12] 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 6f96820168346740689faa6eec1e1df6691ed2c6 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 19 Apr 2023 10:16:37 +0200 Subject: [PATCH 02/12] refs #5237 Ahora lee un conjunto de arrays --- .../email/greuge-wrong/assets/css/import.js | 11 ++++ .../email/greuge-wrong/greuge-wrong.html | 29 ++++++----- .../email/greuge-wrong/greuge-wrong.js | 51 ++++++++++++------- .../email/greuge-wrong/locale/en.yml | 11 ++-- .../email/greuge-wrong/locale/es.yml | 11 ++-- 5 files changed, 71 insertions(+), 42 deletions(-) create mode 100644 print/templates/email/greuge-wrong/assets/css/import.js diff --git a/print/templates/email/greuge-wrong/assets/css/import.js b/print/templates/email/greuge-wrong/assets/css/import.js new file mode 100644 index 000000000..89b2afaa5 --- /dev/null +++ b/print/templates/email/greuge-wrong/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(); \ No newline at end of file diff --git a/print/templates/email/greuge-wrong/greuge-wrong.html b/print/templates/email/greuge-wrong/greuge-wrong.html index 4f0874268..336007122 100644 --- a/print/templates/email/greuge-wrong/greuge-wrong.html +++ b/print/templates/email/greuge-wrong/greuge-wrong.html @@ -1,14 +1,15 @@ - - - - - - {{ $t('subject') }} - - -

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

-

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

-

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

-

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

- - \ No newline at end of file + +
+
+

{{ $t('total') }}: {{tickets.length}}

+
+
+
+

{{ $t('ticketId') }}: {{ticket.ticketId}}

+

{{ $t('clientId') }}: {{ticket.clientId}}

+

{{ $t('description') }}: {{ticket.description}}

+

{{ $t('amount') }}: {{ticket.amount}} €

+
+
+
+
\ 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 index ac18c4e9b..2aa3d50a7 100644 --- a/print/templates/email/greuge-wrong/greuge-wrong.js +++ b/print/templates/email/greuge-wrong/greuge-wrong.js @@ -1,21 +1,36 @@ +const Component = require(`vn-print/core/component`); +const emailBody = new Component('email-body'); +const models = require('vn-loopback/server/server').models; + 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 - } + async serverPrefetch() { + this.url = await this.salixUrl(); + + if (!this.url) + throw new Error('Something went wrong'); }, -}; + components: { + 'email-body': emailBody.build(), + }, + methods: { + async salixUrl() { + const salix = await models.Url.findOne({ + where: { + appName: 'salix', + environment: process.env.NODE_ENV || 'dev' + } + }); + return salix.url; + }, + clientGreugeUrl(clientId) { + return `${this.url}client/${clientId}/greuge/index` + }, + }, + props: { + tickets: { + type: Array, + required: true + }, + }, +}; \ No newline at end of file diff --git a/print/templates/email/greuge-wrong/locale/en.yml b/print/templates/email/greuge-wrong/locale/en.yml index 67fb74ccb..0ace99c36 100644 --- a/print/templates/email/greuge-wrong/locale/en.yml +++ b/print/templates/email/greuge-wrong/locale/en.yml @@ -1,5 +1,6 @@ -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 +subject: Abnormal greuges have been created +total: Total number of abnormal greuges +ticketId: Ticket +clientId: Client +description: Description +amount: Amount \ 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 index 4282fd3af..fd2397182 100644 --- a/print/templates/email/greuge-wrong/locale/es.yml +++ b/print/templates/email/greuge-wrong/locale/es.yml @@ -1,5 +1,6 @@ -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 +subject: Se han creado greuges anormales +total: Número total de greuges anormales +ticketId: Ticket +clientId: Cliente +description: Descipción +amount: Importe \ No newline at end of file From 38e5660e61a63a81be19ca0df78d44e0240f6ecc Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 21 Apr 2023 13:59:28 +0200 Subject: [PATCH 03/12] =?UTF-8?q?refs=20#5542=20refactorizado=20"abono"=20?= =?UTF-8?q?para=20que=20siempre=20cree=20un=20=C3=BAnico=20ticket=20abono?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../back/methods/invoiceOut/refund.js | 2 +- .../invoiceOut/front/descriptor-menu/index.js | 7 +- modules/ticket/back/methods/sale/refund.js | 67 +++---------------- modules/ticket/back/methods/ticket/refund.js | 9 +-- modules/ticket/front/descriptor-menu/index.js | 2 +- modules/ticket/front/sale/index.js | 2 +- 6 files changed, 18 insertions(+), 71 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/refund.js b/modules/invoiceOut/back/methods/invoiceOut/refund.js index ba1fdfedd..ad480dc7d 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/refund.js +++ b/modules/invoiceOut/back/methods/invoiceOut/refund.js @@ -35,7 +35,7 @@ module.exports = Self => { const tickets = await models.Ticket.find(filter, myOptions); const ticketsIds = tickets.map(ticket => ticket.id); - const refundedTickets = await models.Ticket.refund(ticketsIds, true, myOptions); + const refundedTickets = await models.Ticket.refund(ticketsIds, myOptions); if (tx) await tx.commit(); diff --git a/modules/invoiceOut/front/descriptor-menu/index.js b/modules/invoiceOut/front/descriptor-menu/index.js index 456939119..57ea653a8 100644 --- a/modules/invoiceOut/front/descriptor-menu/index.js +++ b/modules/invoiceOut/front/descriptor-menu/index.js @@ -118,8 +118,11 @@ class Controller extends Section { const query = 'InvoiceOuts/refund'; const params = {ref: this.invoiceOut.ref}; this.$http.post(query, params).then(res => { - const ticketIds = res.data.map(ticket => ticket.id).join(', '); - this.vnApp.showSuccess(this.$t('The following refund tickets have been created', {ticketIds})); + const refundTicket = res.data; + this.vnApp.showSuccess(this.$t('The following refund ticket have been created', { + ticketId: refundTicket.id + })); + this.$state.go('ticket.card.sale', {id: refundTicket.id}); }); } } diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index 7b63fd66e..af58a6286 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -11,11 +11,6 @@ module.exports = Self => { { arg: 'servicesIds', type: ['number'] - }, - { - arg: 'createSingleTicket', - type: 'boolean', - required: false } ], returns: { @@ -28,7 +23,7 @@ module.exports = Self => { } }); - Self.refund = async(salesIds, servicesIds, createSingleTicket = false, options) => { + Self.refund = async(salesIds, servicesIds, options) => { const models = Self.app.models; const myOptions = {}; let tx; @@ -67,40 +62,14 @@ module.exports = Self => { const sales = await models.Sale.find(salesFilter, myOptions); const ticketsIds = [...new Set(sales.map(sale => sale.ticketFk))]; - const refundTickets = []; - const mappedTickets = new Map(); const now = Date.vnNew(); - const [firstTicketId] = ticketsIds; - if (createSingleTicket) { - await createTicketRefund( - firstTicketId, - refundTickets, - mappedTickets, - now, - refundAgencyMode, - refoundZoneId, - myOptions - ); - } else { - for (let ticketId of ticketsIds) { - await createTicketRefund( - ticketId, - refundTickets, - mappedTickets, - now, - refundAgencyMode, - refoundZoneId, - myOptions - ); - } - } + + const refundTicket = await createTicketRefund(firstTicketId, now, refundAgencyMode, refoundZoneId, myOptions); for (const sale of sales) { - const refundTicketId = await getTicketRefundId(createSingleTicket, sale.ticketFk, refundTickets, mappedTickets); - const createdSale = await models.Sale.create({ - ticketFk: refundTicketId, + ticketFk: refundTicket.id, itemFk: sale.itemFk, quantity: - sale.quantity, concept: sale.concept, @@ -120,16 +89,13 @@ module.exports = Self => { where: {id: {inq: servicesIds}} }; const services = await models.TicketService.find(servicesFilter, myOptions); - for (const service of services) { - const refundTicketId = await getTicketRefundId(createSingleTicket, service.ticketFk, refundTickets, mappedTickets); - await models.TicketService.create({ description: service.description, quantity: - service.quantity, price: service.price, taxClassFk: service.taxClassFk, - ticketFk: refundTicketId, + ticketFk: refundTicket.id, ticketServiceTypeFk: service.ticketServiceTypeFk, }, myOptions); } @@ -137,22 +103,14 @@ module.exports = Self => { if (tx) await tx.commit(); - return refundTickets; + return refundTicket; } catch (e) { if (tx) await tx.rollback(); throw e; } }; - async function createTicketRefund( - ticketId, - refundTickets, - mappedTickets, - now, - refundAgencyMode, - refoundZoneId, - myOptions - ) { + async function createTicketRefund(ticketId, now, refundAgencyMode, refoundZoneId, myOptions) { const models = Self.app.models; const filter = {include: {relation: 'address'}}; @@ -170,20 +128,11 @@ module.exports = Self => { zoneFk: refoundZoneId }, myOptions); - refundTickets.push(refundTicket); - - mappedTickets.set(ticketId, refundTicket.id); - await models.TicketRefund.create({ refundTicketFk: refundTicket.id, originalTicketFk: ticket.id, }, myOptions); - } - async function getTicketRefundId(createSingleTicket, ticketId, refundTickets, mappedTickets) { - if (createSingleTicket) { - const [firstRefundTicket] = refundTickets; - return firstRefundTicket.id; - } else return mappedTickets.get(ticketId); + return refundTicket; } }; diff --git a/modules/ticket/back/methods/ticket/refund.js b/modules/ticket/back/methods/ticket/refund.js index 1f0021316..91f48cfd6 100644 --- a/modules/ticket/back/methods/ticket/refund.js +++ b/modules/ticket/back/methods/ticket/refund.js @@ -7,11 +7,6 @@ module.exports = Self => { arg: 'ticketsIds', type: ['number'], required: true - }, - { - arg: 'createSingleTicket', - type: 'boolean', - required: false } ], returns: { @@ -24,7 +19,7 @@ module.exports = Self => { } }); - Self.refund = async(ticketsIds, createSingleTicket = false, options) => { + Self.refund = async(ticketsIds, options) => { const models = Self.app.models; const myOptions = {}; let tx; @@ -46,7 +41,7 @@ module.exports = Self => { const services = await models.TicketService.find(filter, myOptions); const servicesIds = services.map(service => service.id); - const refundedTickets = await models.Sale.refund(salesIds, servicesIds, createSingleTicket, myOptions); + const refundedTickets = await models.Sale.refund(salesIds, servicesIds, myOptions); if (tx) await tx.commit(); diff --git a/modules/ticket/front/descriptor-menu/index.js b/modules/ticket/front/descriptor-menu/index.js index ff029db78..0ac981a2c 100644 --- a/modules/ticket/front/descriptor-menu/index.js +++ b/modules/ticket/front/descriptor-menu/index.js @@ -300,7 +300,7 @@ class Controller extends Section { const params = {ticketsIds: [this.id]}; const query = 'Tickets/refund'; return this.$http.post(query, params).then(res => { - const [refundTicket] = res.data; + const refundTicket = res.data; this.vnApp.showSuccess(this.$t('The following refund ticket have been created', { ticketId: refundTicket.id })); diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 20739b619..24b077476 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -516,7 +516,7 @@ class Controller extends Section { const params = {salesIds: salesIds}; const query = 'Sales/refund'; this.$http.post(query, params).then(res => { - const [refundTicket] = res.data; + const refundTicket = res.data; this.vnApp.showSuccess(this.$t('The following refund ticket have been created', { ticketId: refundTicket.id })); From 9f04581862ac73e8ec875aa9848dca7e28b50172 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 21 Apr 2023 14:00:28 +0200 Subject: [PATCH 04/12] refs #5542 "importar reclamacion" crea un registro en ticketRefund --- .../back/methods/claim-beginning/importToNewRefundTicket.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js index f0686ffa6..83043f012 100644 --- a/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js +++ b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js @@ -109,6 +109,11 @@ module.exports = Self => { zoneFk: zone.id }, myOptions); + await models.TicketRefund.create({ + refundTicketFk: newRefundTicket.id, + originalTicketFk: claim.ticket().id + }, myOptions); + await saveObservation({ description: `Reclama ticket: ${claim.ticketFk}`, ticketFk: newRefundTicket.id, From 2b74ab43aec5243fb7d86406777fb70707ea90fb Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 21 Apr 2023 14:12:53 +0200 Subject: [PATCH 05/12] refactor front --- modules/claim/front/action/index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/claim/front/action/index.html b/modules/claim/front/action/index.html index 81b14d3a7..9da51b8de 100644 --- a/modules/claim/front/action/index.html +++ b/modules/claim/front/action/index.html @@ -16,7 +16,7 @@ value="{{$ctrl.claimedTotal | currency: 'EUR':2}}"> - + - + label="Change destination" + disabled="$ctrl.checked.length == 0" + ng-click="changeDestination.show()"> + + + - - - + From e24366707b0b7d4be5b7d6ffd6c00012ed397812 Mon Sep 17 00:00:00 2001 From: vicent Date: Fri, 21 Apr 2023 14:26:12 +0200 Subject: [PATCH 06/12] =?UTF-8?q?refactor:=20=20a=C3=B1adido=20focus=20a?= =?UTF-8?q?=20la=20seccion=20usuarios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/account/front/main/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/account/front/main/index.html b/modules/account/front/main/index.html index dd3489e9f..5872a328d 100644 --- a/modules/account/front/main/index.html +++ b/modules/account/front/main/index.html @@ -6,6 +6,7 @@ - \ No newline at end of file + From 9b432bac85422c6ed415d3c762881c2aa5916e8b Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 24 Apr 2023 08:57:10 +0200 Subject: [PATCH 07/12] refs #5542 fix: test --- .../methods/invoiceOut/specs/refund.spec.js | 2 +- .../back/methods/sale/specs/refund.spec.js | 28 +++++++------------ .../front/descriptor-menu/index.spec.js | 2 +- modules/ticket/front/sale/index.spec.js | 3 +- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js index c5a1ac603..35f2b4023 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/refund.spec.js @@ -17,7 +17,7 @@ describe('InvoiceOut refund()', () => { try { const result = await models.InvoiceOut.refund('T1111111', options); - expect(result.length).toEqual(1); + expect(result).toBeDefined(); await tx.rollback(); } catch (e) { diff --git a/modules/ticket/back/methods/sale/specs/refund.spec.js b/modules/ticket/back/methods/sale/specs/refund.spec.js index 403b4b477..75cba89a9 100644 --- a/modules/ticket/back/methods/sale/specs/refund.spec.js +++ b/modules/ticket/back/methods/sale/specs/refund.spec.js @@ -22,9 +22,9 @@ describe('Sale refund()', () => { try { const options = {transaction: tx}; - const response = await models.Sale.refund(salesIds, servicesIds, false, options); + const refundedTicket = await models.Sale.refund(salesIds, servicesIds, false, options); - expect(response.length).toBeGreaterThanOrEqual(1); + expect(refundedTicket).toBeDefined(); await tx.rollback(); } catch (e) { @@ -33,7 +33,7 @@ describe('Sale refund()', () => { } }); - it('should create a ticket for each unique ticketFk in the sales', async() => { + it('should create one ticket for each unique ticketFk in the sales', async() => { const tx = await models.Sale.beginTransaction({}); const salesIds = [6, 7]; @@ -41,15 +41,11 @@ describe('Sale refund()', () => { const options = {transaction: tx}; const createSingleTicket = false; - const tickets = await models.Sale.refund(salesIds, servicesIds, createSingleTicket, options); + const ticket = await models.Sale.refund(salesIds, servicesIds, createSingleTicket, options); - const ticketsIds = tickets.map(ticket => ticket.id); - - const refundedTickets = await models.Ticket.find({ + const refundedTicket = await models.Ticket.findOne({ where: { - id: { - inq: ticketsIds - } + id: ticket.id }, include: [ { @@ -66,16 +62,12 @@ describe('Sale refund()', () => { ] }, options); - const firstRefoundedTicket = refundedTickets[0]; - const secondRefoundedTicket = refundedTickets[1]; - const salesLength = firstRefoundedTicket.ticketSales().length; - const componentsLength = firstRefoundedTicket.ticketSales()[0].components().length; - const servicesLength = secondRefoundedTicket.ticketServices().length; + const salesLength = refundedTicket.ticketSales().length; + const componentsLength = refundedTicket.ticketSales()[0].components().length; - expect(refundedTickets.length).toEqual(2); - expect(salesLength).toEqual(1); + expect(refundedTicket).toBeDefined(); + expect(salesLength).toEqual(2); expect(componentsLength).toEqual(4); - expect(servicesLength).toBeGreaterThanOrEqual(1); await tx.rollback(); } catch (e) { diff --git a/modules/ticket/front/descriptor-menu/index.spec.js b/modules/ticket/front/descriptor-menu/index.spec.js index babc22038..48998325a 100644 --- a/modules/ticket/front/descriptor-menu/index.spec.js +++ b/modules/ticket/front/descriptor-menu/index.spec.js @@ -250,7 +250,7 @@ describe('Ticket Component vnTicketDescriptorMenu', () => { const params = { ticketsIds: [16] }; - $httpBackend.expectPOST('Tickets/refund', params).respond([{id: 99}]); + $httpBackend.expectPOST('Tickets/refund', params).respond({id: 99}); controller.refund(); $httpBackend.flush(); diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index c35ed3d9a..5fb3b3df3 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -726,8 +726,7 @@ describe('Ticket', () => { salesIds: [1, 4], }; const refundTicket = {id: 99}; - const createdTickets = [refundTicket]; - $httpBackend.expect('POST', 'Sales/refund', params).respond(200, createdTickets); + $httpBackend.expect('POST', 'Sales/refund', params).respond(200, refundTicket); controller.createRefund(); $httpBackend.flush(); From 4983aa1632b2f010acff1c686415bf03acd79ad6 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 24 Apr 2023 09:11:09 +0200 Subject: [PATCH 08/12] refs #5542 fix backTest --- modules/ticket/back/methods/sale/specs/refund.spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/sale/specs/refund.spec.js b/modules/ticket/back/methods/sale/specs/refund.spec.js index 75cba89a9..83b3755e2 100644 --- a/modules/ticket/back/methods/sale/specs/refund.spec.js +++ b/modules/ticket/back/methods/sale/specs/refund.spec.js @@ -22,7 +22,7 @@ describe('Sale refund()', () => { try { const options = {transaction: tx}; - const refundedTicket = await models.Sale.refund(salesIds, servicesIds, false, options); + const refundedTicket = await models.Sale.refund(salesIds, servicesIds, options); expect(refundedTicket).toBeDefined(); @@ -40,8 +40,7 @@ describe('Sale refund()', () => { try { const options = {transaction: tx}; - const createSingleTicket = false; - const ticket = await models.Sale.refund(salesIds, servicesIds, createSingleTicket, options); + const ticket = await models.Sale.refund(salesIds, servicesIds, options); const refundedTicket = await models.Ticket.findOne({ where: { From 618100b68a86e35f24009c2e19271bcb550a7328 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 25 Apr 2023 10:40:24 +0200 Subject: [PATCH 09/12] refs #5542 eliminados procesos que no se usan --- db/changes/231601/00-deleteProcs_refund.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 db/changes/231601/00-deleteProcs_refund.sql diff --git a/db/changes/231601/00-deleteProcs_refund.sql b/db/changes/231601/00-deleteProcs_refund.sql new file mode 100644 index 000000000..8bf8982f4 --- /dev/null +++ b/db/changes/231601/00-deleteProcs_refund.sql @@ -0,0 +1,2 @@ +DROP PROCEDURE `vn`.`refund`; +DROP PROCEDURE `vn`.`ticket_doRefund`; From a6653c5622008d66e6295f171c1744b8a42b08a9 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 25 Apr 2023 10:40:35 +0200 Subject: [PATCH 10/12] refs #5542 fix e2e --- e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index 323646d29..1b3204046 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -246,6 +246,7 @@ describe('Ticket Edit sale path', () => { it('should select the third sale and create a claim of it', async() => { await page.accessToSearchResult('16'); await page.accessToSection('ticket.card.sale'); + await page.waitToClick(selectors.ticketSales.firstSaleCheckbox); await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox); await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim); From 480784ee18aac40baa1473799d124128428322c2 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Apr 2023 13:48:31 +0200 Subject: [PATCH 11/12] refs #084200 cambio nombre --- db/changes/231601/{00-insertI18n.sql => 01-insert.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename db/changes/231601/{00-insertI18n.sql => 01-insert.sql} (100%) diff --git a/db/changes/231601/00-insertI18n.sql b/db/changes/231601/01-insert.sql similarity index 100% rename from db/changes/231601/00-insertI18n.sql rename to db/changes/231601/01-insert.sql From 09c1d7e393ef62efe3f6d3f12ca72d331d3427f1 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Apr 2023 14:30:58 +0200 Subject: [PATCH 12/12] refs #084200 add table --- db/changes/231601/01-insert.sql | 5 ----- db/export-data.sh | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 db/changes/231601/01-insert.sql diff --git a/db/changes/231601/01-insert.sql b/db/changes/231601/01-insert.sql deleted file mode 100644 index f86cb6a73..000000000 --- a/db/changes/231601/01-insert.sql +++ /dev/null @@ -1,5 +0,0 @@ -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.'), - (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.'), - (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.'), - (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.'); diff --git a/db/export-data.sh b/db/export-data.sh index bdf8049e0..11358e64c 100755 --- a/db/export-data.sh +++ b/db/export-data.sh @@ -68,6 +68,7 @@ TABLES=( time volumeConfig workCenter + companyI18n ) dump_tables ${TABLES[@]}