From 0579c563b95757fb3fba0eaca92996a39c265643 Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 22 Mar 2023 15:03:12 +0100 Subject: [PATCH 01/18] refs #5327 ordernar por columnas --- .../ticket/back/methods/ticket/getSales.js | 37 ++++++++++++++----- modules/ticket/front/sale/index.html | 18 ++++----- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/modules/ticket/back/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js index 321e8e24e..17261f6fc 100644 --- a/modules/ticket/back/methods/ticket/getSales.js +++ b/modules/ticket/back/methods/ticket/getSales.js @@ -3,13 +3,20 @@ module.exports = Self => { Self.remoteMethod('getSales', { description: 'New filter', accessType: 'READ', - accepts: [{ - arg: 'id', - type: 'number', - required: true, - description: 'The ticket id', - http: {source: 'path'} - }], + accepts: [ + { + arg: 'filter', + type: 'object', + description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', + http: {source: 'query'} + }, + { + arg: 'id', + type: 'number', + required: true, + description: 'The ticket id', + http: {source: 'path'} + }], returns: { type: ['object'], root: true @@ -20,14 +27,24 @@ module.exports = Self => { } }); - Self.getSales = async(id, options) => { + Self.getSales = async(filter, id, options) => { const models = Self.app.models; - const myOptions = {}; if (typeof options == 'object') Object.assign(myOptions, options); + // let newFilter; + // if (filter && filter.order) { + // const filterOrder = filter.order; + // const saleColumns = ['itemFk', 'quantity', 'concept', 'price', 'discount']; + + // for (const saleColum of saleColumns) { + // if (filterOrder.includes(saleColum)) return newFilter = filter.order; + // else newFilter = 'concept'; + // } + // } + // console.log(newFilter); const sales = await models.Sale.find({ include: { relation: 'item', @@ -53,7 +70,7 @@ module.exports = Self => { } }, where: {ticketFk: id}, - order: 'concept' + order: newFilter }, myOptions); // Get items available diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 8764417a8..74cb101f4 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -60,15 +60,15 @@ - Visible - Available - Id - Quantity - Item - Price - Disc - Amount - Packaging + Visible + Available + Id + Quantity + Item + Price + Disc + Amount + Packaging From 34126119e2c0cd43a220b07fe573c650f59a8986 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 23 Mar 2023 09:02:22 +0100 Subject: [PATCH 02/18] fix errors --- modules/ticket/back/methods/ticket/getSales.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/modules/ticket/back/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js index 17261f6fc..e3d6af389 100644 --- a/modules/ticket/back/methods/ticket/getSales.js +++ b/modules/ticket/back/methods/ticket/getSales.js @@ -29,22 +29,13 @@ module.exports = Self => { Self.getSales = async(filter, id, options) => { const models = Self.app.models; + const myOptions = {}; if (typeof options == 'object') Object.assign(myOptions, options); - // let newFilter; - // if (filter && filter.order) { - // const filterOrder = filter.order; - // const saleColumns = ['itemFk', 'quantity', 'concept', 'price', 'discount']; - - // for (const saleColum of saleColumns) { - // if (filterOrder.includes(saleColum)) return newFilter = filter.order; - // else newFilter = 'concept'; - // } - // } - // console.log(newFilter); + console.log(filter); const sales = await models.Sale.find({ include: { relation: 'item', @@ -70,7 +61,7 @@ module.exports = Self => { } }, where: {ticketFk: id}, - order: newFilter + order: 'concept' }, myOptions); // Get items available @@ -126,7 +117,7 @@ module.exports = Self => { if (salesWithLogs.includes(sale.id)) sale.$hasLogs = true; } - + console.log(sales); return sales; }; }; From faab024e24ba61ed6095cc7e7796025642514e6a Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 6 Apr 2023 09:59:45 +0200 Subject: [PATCH 03/18] test --- modules/ticket/front/sale/index.html | 6 +++--- modules/ticket/front/sale/index.js | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 74cb101f4..2b3674a75 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -63,7 +63,7 @@ Visible Available Id - Quantity + Quantity Item Price Disc @@ -73,7 +73,7 @@ - + @@ -232,7 +232,7 @@ vn-tooltip="Add item" vn-bind="+" icon="add_circle" - ng-click="$ctrl.add()" + ng-click="$ctrl.cambiarOrden('quantity')" disabled="!$ctrl.isEditable"> diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index f3fb89d04..075532d8f 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -7,6 +7,12 @@ class Controller extends Section { super($element, $); this._sales = []; this.manaCode = 'mana'; + this.ordenarPor = 'quantity'; + } + + cambiarOrden(columna) { + this.ordenarPor = columna; + console.log(this.ordenarPor); } get manaCode() { From cc9ce65678f175e78ad9ff15352a4578a7de0908 Mon Sep 17 00:00:00 2001 From: vicent Date: Tue, 11 Apr 2023 07:44:25 +0200 Subject: [PATCH 04/18] test --- modules/ticket/front/sale/index.html | 4 ++-- modules/ticket/front/sale/index.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 74cb101f4..1b378a9da 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -63,7 +63,7 @@ Visible Available Id - Quantity + Quantity Item Price Disc @@ -73,7 +73,7 @@ - + diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index f3fb89d04..379b48cc9 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -7,6 +7,11 @@ class Controller extends Section { super($element, $); this._sales = []; this.manaCode = 'mana'; + this.ordenarPor = 'nombre'; + } + + cambiarOrden(columna) { + this.ordenarPor = columna; } get manaCode() { From eaf425fb518c525ef27b798cecb1fe598981dffb Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 3 May 2023 12:30:33 +0200 Subject: [PATCH 05/18] refs #5328 mod funcion createTicketRefund --- modules/ticket/back/methods/sale/refund.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index af58a6286..2517fbd99 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -11,7 +11,7 @@ module.exports = Self => { { arg: 'servicesIds', type: ['number'] - } + }, ], returns: { type: ['number'], @@ -110,11 +110,13 @@ module.exports = Self => { } }; - async function createTicketRefund(ticketId, now, refundAgencyMode, refoundZoneId, myOptions) { + async function createTicketRefund(ticketId, now, refundAgencyMode, refoundZoneId, myOptions, vTicketId) { const models = Self.app.models; const filter = {include: {relation: 'address'}}; const ticket = await models.Ticket.findById(ticketId, filter, myOptions); + const query = `CALL vn.ticket_recalc(?)`; + const [result] = await Self.rawSql(query, [vTicketId]); const refundTicket = await models.Ticket.create({ clientFk: ticket.clientFk, @@ -131,7 +133,7 @@ module.exports = Self => { await models.TicketRefund.create({ refundTicketFk: refundTicket.id, originalTicketFk: ticket.id, - }, myOptions); + }, myOptions, [result]); return refundTicket; } From 3b2e1ca8d5db0e73369f62fd29fe0f08618b5557 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 3 May 2023 12:36:30 +0200 Subject: [PATCH 06/18] ref #5328 refundTicket.id --- modules/ticket/back/methods/sale/refund.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index 2517fbd99..d58875019 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -101,6 +101,8 @@ module.exports = Self => { } } + const query = `CALL vn.ticket_recalc(?)`; + const [result] = await Self.rawSql(query, [refundTicket.id]); if (tx) await tx.commit(); return refundTicket; @@ -115,8 +117,6 @@ module.exports = Self => { const filter = {include: {relation: 'address'}}; const ticket = await models.Ticket.findById(ticketId, filter, myOptions); - const query = `CALL vn.ticket_recalc(?)`; - const [result] = await Self.rawSql(query, [vTicketId]); const refundTicket = await models.Ticket.create({ clientFk: ticket.clientFk, From 566f03c4976deb68e499e11258983b3e2de880ce Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 3 May 2023 13:03:14 +0200 Subject: [PATCH 07/18] refs #5328 commit prueba --- modules/ticket/back/methods/sale/refund.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index d58875019..9ee7735a0 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -112,7 +112,7 @@ module.exports = Self => { } }; - async function createTicketRefund(ticketId, now, refundAgencyMode, refoundZoneId, myOptions, vTicketId) { + async function createTicketRefund(ticketId, now, refundAgencyMode, refoundZoneId, myOptions) { const models = Self.app.models; const filter = {include: {relation: 'address'}}; @@ -133,7 +133,7 @@ module.exports = Self => { await models.TicketRefund.create({ refundTicketFk: refundTicket.id, originalTicketFk: ticket.id, - }, myOptions, [result]); + }, myOptions); return refundTicket; } From 3ac1ce403c8873013f5c77e426cedbc2e6f5b32b Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 3 May 2023 14:06:57 +0200 Subject: [PATCH 08/18] refs #5328 myOptions --- modules/ticket/back/methods/sale/refund.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index 9ee7735a0..ffbc73db0 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -100,9 +100,7 @@ module.exports = Self => { }, myOptions); } } - - const query = `CALL vn.ticket_recalc(?)`; - const [result] = await Self.rawSql(query, [refundTicket.id]); + const query = `CALL vn.ticket_recalc(?)`; await Self.rawSql(query, [refundTicket.id], myOptions); if (tx) await tx.commit(); return refundTicket; From dbd0e5138b1d396b36b35e01a53206b02e301b51 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 3 May 2023 14:12:26 +0200 Subject: [PATCH 09/18] refs #5328 fix --- modules/ticket/back/methods/sale/refund.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index ffbc73db0..3a633de0f 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -11,7 +11,7 @@ module.exports = Self => { { arg: 'servicesIds', type: ['number'] - }, + } ], returns: { type: ['number'], From 8ed17d99c3945e8cea073f77de3f0f05ba415ce9 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 11 May 2023 10:02:45 +0200 Subject: [PATCH 10/18] refs #5327 permite filtrar por columnas (desde el front) --- .../ticket/back/methods/ticket/getSales.js | 26 +++++++------------ modules/ticket/front/sale/index.html | 20 +++++++------- modules/ticket/front/sale/index.js | 6 ++--- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/modules/ticket/back/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js index e3d6af389..321e8e24e 100644 --- a/modules/ticket/back/methods/ticket/getSales.js +++ b/modules/ticket/back/methods/ticket/getSales.js @@ -3,20 +3,13 @@ module.exports = Self => { Self.remoteMethod('getSales', { description: 'New filter', accessType: 'READ', - accepts: [ - { - arg: 'filter', - type: 'object', - description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', - http: {source: 'query'} - }, - { - arg: 'id', - type: 'number', - required: true, - description: 'The ticket id', - http: {source: 'path'} - }], + accepts: [{ + arg: 'id', + type: 'number', + required: true, + description: 'The ticket id', + http: {source: 'path'} + }], returns: { type: ['object'], root: true @@ -27,7 +20,7 @@ module.exports = Self => { } }); - Self.getSales = async(filter, id, options) => { + Self.getSales = async(id, options) => { const models = Self.app.models; const myOptions = {}; @@ -35,7 +28,6 @@ module.exports = Self => { if (typeof options == 'object') Object.assign(myOptions, options); - console.log(filter); const sales = await models.Sale.find({ include: { relation: 'item', @@ -117,7 +109,7 @@ module.exports = Self => { if (salesWithLogs.includes(sale.id)) sale.$hasLogs = true; } - console.log(sales); + return sales; }; }; diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 3bf4e06d0..668c3b6dc 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -60,20 +60,20 @@ - Visible - Available - Id - Quantity - Item - Price - Disc - Amount - Packaging + Visible + Available + Id + Quantity + Item + Price + Disc + Amount + Packaging - + diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index 379b48cc9..ec43093f8 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -7,11 +7,11 @@ class Controller extends Section { super($element, $); this._sales = []; this.manaCode = 'mana'; - this.ordenarPor = 'nombre'; } - cambiarOrden(columna) { - this.ordenarPor = columna; + sortBy(propertyName) { + this.reverse = (this.propertyName === propertyName) ? !this.reverse : false; + this.propertyName = propertyName; } get manaCode() { From a7fcd8a1bf9f12607ee799c26eaaa540d30d8c4d Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 11 May 2023 10:04:15 +0200 Subject: [PATCH 11/18] changes --- modules/ticket/front/sale/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index 9d145d4fc..abdf5f88f 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -64,7 +64,7 @@ Visible Available Id - Quantity + Quantity Item Price Disc @@ -233,7 +233,7 @@ vn-tooltip="Add item" vn-bind="+" icon="add_circle" - ng-click="$ctrl.cambiarOrden('quantity')" + ng-click="$ctrl.add()" disabled="!$ctrl.isEditable"> @@ -481,7 +481,7 @@ on-accept="$ctrl.transferSales($ctrl.transfer.ticketId)"> - Add claim - + Date: Thu, 11 May 2023 10:04:59 +0200 Subject: [PATCH 12/18] borrado espacio --- modules/ticket/front/sale/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index abdf5f88f..c5fe0743f 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -63,7 +63,7 @@ Visible Available - Id + Id Quantity Item Price From 90b844062d31d3e213fe782bcffea2d5f026fb67 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 11 May 2023 10:17:41 +0200 Subject: [PATCH 13/18] refs #5327 add frontTest --- modules/ticket/front/sale/index.spec.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index 5fb3b3df3..9c340ea74 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -2,7 +2,7 @@ import './index.js'; import watcher from 'core/mocks/watcher'; import crudModel from 'core/mocks/crud-model'; -describe('Ticket', () => { +fdescribe('Ticket', () => { describe('Component vnTicketSale', () => { let controller; let $scope; @@ -758,5 +758,15 @@ describe('Ticket', () => { expect(controller.$.editDiscount.hide).toHaveBeenCalledWith(); }); }); + + describe('sortBy()', () => { + it('should set reverse and propertyName properties', () => { + const propertyName = 'id'; + controller.sortBy(propertyName); + + expect(controller.propertyName).toEqual(propertyName); + expect(controller.reverse).toEqual(false); + }); + }); }); }); From 2ed99426ef7b2c86833e83f1aadcc0abbcd13569 Mon Sep 17 00:00:00 2001 From: vicent Date: Thu, 11 May 2023 10:18:02 +0200 Subject: [PATCH 14/18] eliminado focus --- modules/ticket/front/sale/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index 9c340ea74..9da8e6e7c 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -2,7 +2,7 @@ import './index.js'; import watcher from 'core/mocks/watcher'; import crudModel from 'core/mocks/crud-model'; -fdescribe('Ticket', () => { +describe('Ticket', () => { describe('Component vnTicketSale', () => { let controller; let $scope; From 95c438b73a67d676755b070f7b726886734a8089 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 26 May 2023 14:52:47 +0200 Subject: [PATCH 15/18] refs #5648 move claimSure --- modules/ticket/front/sale/index.html | 4 ++-- modules/ticket/front/sale/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index b2c0db18d..f7b3c161d 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -491,7 +491,7 @@ + on-accept="$ctrl.onCreateClaimAccepted()"> @@ -513,7 +513,7 @@ Add claim diff --git a/modules/ticket/front/sale/index.js b/modules/ticket/front/sale/index.js index be5f22154..ebf74fb9d 100644 --- a/modules/ticket/front/sale/index.js +++ b/modules/ticket/front/sale/index.js @@ -203,7 +203,7 @@ class Controller extends Section { if (pastDays >= this.ticketConfig[0].daysForWarningClaim) this.$.claimConfirm.show(); else - this.onCreateClaimAccepted(); + this.$.claimSure.show(); } onCreateClaimAccepted() { From 138d158f4f69331feb1b43b9f3e32d45aea5517d Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 29 May 2023 09:11:41 +0200 Subject: [PATCH 16/18] #refs 5684 remove and mod selectors --- e2e/helpers/selectors.js | 1 + e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js | 1 - loopback/locale/en.json | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 086909ebf..dcd9211f9 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -625,6 +625,7 @@ export default { selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check', secondSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(2) vn-check[ng-model="sale.checked"]', thirdSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(3) vn-check[ng-model="sale.checked"]', + fourthSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(4) vn-check[ng-model="sale.checked"]', deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]', transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]', moveToTicketInput: 'form vn-input-number[ng-model="$ctrl.transfer.ticketId"] input', 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 2158eec8b..2c9646708 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 @@ -251,7 +251,6 @@ describe('Ticket Edit sale path', () => { await page.waitToClick(selectors.ticketSales.moreMenu); await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim); await page.waitToClick(selectors.globalItems.acceptButton); - await page.waitToClick(selectors.globalItems.acceptButton); await page.waitForState('claim.card.basicData'); }); diff --git a/loopback/locale/en.json b/loopback/locale/en.json index e950b981b..b8e97412c 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -171,5 +171,7 @@ "Added observation": "Added observation", "Comment added to client": "Comment added to client", "This ticket is already a refund": "This ticket is already a refund", - "A claim with that sale already exists": "A claim with that sale already exists" -} + "A claim with that sale already exists": "A claim with that sale already exists", + "Can't transfer claimed sales": "Can't transfer claimed sales", + "Invalid quantity": "Invalid quantity" +} \ No newline at end of file From 41b1b2fb3fb3a1bde8fdbda6ac4b549838bdd04f Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 29 May 2023 10:02:21 +0200 Subject: [PATCH 17/18] fix > --- modules/item/front/descriptor/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html index d98eabe3e..7c442d364 100644 --- a/modules/item/front/descriptor/index.html +++ b/modules/item/front/descriptor/index.html @@ -115,7 +115,7 @@ ng-model="$ctrl.warehouseFk" data="warehouses" show-field="name" - value="id">> + value="id"> From ec5a5be9e67ebf99aa57d1e9362839cf0befd94a Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 30 May 2023 09:18:52 +0200 Subject: [PATCH 18/18] refs #5328 remove spaces --- modules/ticket/back/methods/sale/refund.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ticket/back/methods/sale/refund.js b/modules/ticket/back/methods/sale/refund.js index 3a633de0f..18ccee976 100644 --- a/modules/ticket/back/methods/sale/refund.js +++ b/modules/ticket/back/methods/sale/refund.js @@ -100,7 +100,10 @@ module.exports = Self => { }, myOptions); } } - const query = `CALL vn.ticket_recalc(?)`; await Self.rawSql(query, [refundTicket.id], myOptions); + + const query = `CALL vn.ticket_recalc(?)`; + await Self.rawSql(query, [refundTicket.id], myOptions); + if (tx) await tx.commit(); return refundTicket;