From c87f060d5166807a93642ad8a9d3655a21269829 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 20 Jun 2024 09:21:27 +0200 Subject: [PATCH 01/12] feat boxPicking refs #7357 --- back/model-config.json | 5 ++++- back/models/expedition_PrintOut.json | 24 ++++++++++++++++++++++++ db/dump/fixtures.before.sql | 8 ++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 back/models/expedition_PrintOut.json diff --git a/back/model-config.json b/back/model-config.json index b643ab54f..58fa86797 100644 --- a/back/model-config.json +++ b/back/model-config.json @@ -64,6 +64,9 @@ "EmailUser": { "dataSource": "vn" }, + "Expedition_PrintOut": { + "dataSource": "vn" + }, "Image": { "dataSource": "vn" }, @@ -190,4 +193,4 @@ "RouteConfig": { "dataSource": "vn" } -} +} \ No newline at end of file diff --git a/back/models/expedition_PrintOut.json b/back/models/expedition_PrintOut.json new file mode 100644 index 000000000..6f521cda3 --- /dev/null +++ b/back/models/expedition_PrintOut.json @@ -0,0 +1,24 @@ +{ + "name": "Expedition_PrintOut", + "base": "VnModel", + "options": { + "mysql": { + "table": "dipole.expedition_PrintOut" + } + }, + "properties": { + "expeditionFk": { + "type": "number", + "id": true, + "description": "id expeditionFk" + }, + "itemFk": { + "type": "number", + "required": true + }, + "shelvingFk": { + "type": "string", + "required": true + } + } +} \ No newline at end of file diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 058c5cd2a..dc9efacf1 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3882,3 +3882,11 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli (1, '2001-05-17', 1, 5), (1, '2001-05-18', 1, 5); + +INSERT INTO dipole.printer (id, description) + VALUES(1, ''); + + INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode, + truckName, clientFk, phone, province, agency, m3, workerCode, itemFk, quantity, longName, shelvingFk, comments) + VALUES(1, 1, 0, ' ', ' ', ' ', ' ', 0, '2001-01-01 00:00:00', 1, 0, ' ', ' ', 0, NULL, '', NULL, 0.000, NULL, 10, NULL, NULL, 'NCC', NULL); + From 182cd3fa8e79423f5cf28c0b13931ee2ceb48e55 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 20 Jun 2024 11:34:51 +0200 Subject: [PATCH 02/12] feat boxPicking refs #7357 --- db/dump/fixtures.before.sql | 2 +- loopback/locale/es.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index dc9efacf1..9cd470dab 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -3883,7 +3883,7 @@ INSERT INTO `vn`.`calendarHolidays` (calendarHolidaysTypeFk, dated, calendarHoli (1, '2001-05-18', 1, 5); -INSERT INTO dipole.printer (id, description) + INSERT INTO dipole.printer (id, description) VALUES(1, ''); INSERT INTO dipole.expedition_PrintOut (expeditionFk, ticketFk, addressFk, street, postalCode, city, shopName, isPrinted, created, printerFk, routeFk, parkingCode, diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 714475374..047774684 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -365,5 +365,6 @@ "You can only have one PDA": "Solo puedes tener un PDA", "It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF", "It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono", - "Payment method is required": "El método de pago es obligatorio" + "Payment method is required": "El método de pago es obligatorio", + "CLIENT_NOT_ESPECIFIED": "CLIENT_NOT_ESPECIFIED" } \ No newline at end of file From 31a75956c040bf44665cf1ba3a9d0e153e479172 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 20 Jun 2024 11:49:25 +0000 Subject: [PATCH 03/12] feat: add CALL util.debugAdd --- back/methods/vn-user/renew-token.js | 66 +++++++++++++++++------------ 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index 5581d19ac..ae554d398 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -16,36 +16,50 @@ module.exports = Self => { accessScopes: ['DEFAULT', 'read:multimedia']}); Self.renewToken = async function(ctx) { - const {accessToken: token} = ctx.req; + let accessToken; + let token; + try { + token = ctx.req.accessToken; + const {courtesyTime} = await models.AccessTokenConfig.findOne({ + fields: ['courtesyTime'] + }); + const isNotExceeded = await Self.validateToken(ctx); + if (isNotExceeded) + return token; - const {courtesyTime} = await models.AccessTokenConfig.findOne({ - fields: ['courtesyTime'] - }); - const isNotExceeded = await Self.validateToken(ctx); - if (isNotExceeded) - return token; - - // Schedule to remove current token - setTimeout(async() => { - try { - const exists = await models.AccessToken.findById(token.id); - exists && await Self.logout(token.id); - } catch (err) { + // Schedule to remove current token + setTimeout(async() => { + try { + const exists = await models.AccessToken.findById(token.id); + exists && await Self.logout(token.id); + } catch (error) { // eslint-disable-next-line no-console - console.error(err); - } - }, courtesyTime * 1000); + console.error(error); + const body = JSON.stringify({err: error, token}); + await handleError(body); + throw new Error(error); + } + }, courtesyTime * 1000); - // Get scopes + // Get scopes - let createTokenOptions = {}; - const {scopes} = token; - if (scopes) - createTokenOptions = {scopes: [scopes[0]]}; - // Create new accessToken - const user = await Self.findById(token.userId); - const accessToken = await user.accessTokens.create(createTokenOptions); + let createTokenOptions = {}; + const {scopes} = token; + if (scopes) + createTokenOptions = {scopes: [scopes[0]]}; + // Create new accessToken + const user = await Self.findById(token.userId); + accessToken = await user.accessTokens.create(createTokenOptions); - return {id: accessToken.id, ttl: accessToken.ttl}; + return {id: accessToken.id, ttl: accessToken.ttl}; + } catch (error) { + const body = JSON.stringify({error: error.message, token, accessToken}); + await handleError(body); + throw new Error(error); + } }; }; + +async function handleError(body, tag = 'renewToken') { + await models.Application.rawSql('CALL util.debugAdd(?,?);', [tag, body]); +} From bfb6689835359d72cd9e6806f1c81d8dab044f92 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 20 Jun 2024 11:50:10 +0000 Subject: [PATCH 04/12] test: add CALL util.debugAdd --- back/methods/vn-user/specs/renew-token.spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/back/methods/vn-user/specs/renew-token.spec.js b/back/methods/vn-user/specs/renew-token.spec.js index 70e7473d1..8f1bb54c1 100644 --- a/back/methods/vn-user/specs/renew-token.spec.js +++ b/back/methods/vn-user/specs/renew-token.spec.js @@ -61,4 +61,21 @@ describe('Renew Token', () => { expect(error).toBeUndefined(); expect(response.id).toEqual(ctx.req.accessToken.id); }); + + it('throw error', async() => { + let error; + + try { + await models.VnUser.renewToken({req: {token: null}}); + } catch (e) { + error = e; + } + + expect(error).toBeDefined(); + const query = 'SELECT * FROM util.debug'; + + const debugLog = await models.Application.rawSql(query, null); + + expect(debugLog.length).toEqual(1); + }); }); From 833a7c87db39ef0bdd10b13f2b2d060098b2fcdb Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 20 Jun 2024 16:26:56 +0200 Subject: [PATCH 05/12] feat boxPicking refs #7357 --- loopback/locale/es.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 047774684..714475374 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -365,6 +365,5 @@ "You can only have one PDA": "Solo puedes tener un PDA", "It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF", "It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono", - "Payment method is required": "El método de pago es obligatorio", - "CLIENT_NOT_ESPECIFIED": "CLIENT_NOT_ESPECIFIED" + "Payment method is required": "El método de pago es obligatorio" } \ No newline at end of file From 68f48de6f0b6564b53fae47c08dcf6bd0c7041dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Thu, 20 Jun 2024 17:14:38 +0200 Subject: [PATCH 06/12] feat: sincro client supplier sage refs #7595 --- .../sage/procedures/accountingMovements_add.sql | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/db/routines/sage/procedures/accountingMovements_add.sql b/db/routines/sage/procedures/accountingMovements_add.sql index ada954334..8c129beb2 100644 --- a/db/routines/sage/procedures/accountingMovements_add.sql +++ b/db/routines/sage/procedures/accountingMovements_add.sql @@ -410,15 +410,26 @@ BEGIN FROM sage.movConta mc JOIN vn.supplier s ON s.account = mc.CodigoCuenta WHERE NOT enlazadoSage - )SELECT idClientSupplier, `type` + ),clientSupplierSync AS( + SELECT idClientSupplier, `type` + FROM sage.clientSupplier cs + WHERE isSync + ) + SELECT idClientSupplier, `type` FROM sage.clientSupplier cs WHERE NOT isSync UNION SELECT id, 'C' - FROM client + FROM client c + LEFT JOIN clientSupplierSync cs ON cs.idClientSupplier = c.id + AND cs.Type ='C' + WHERE cs.idClientSupplier IS NULL UNION SELECT id, 'P' - FROM supplier; + FROM supplier s + LEFT JOIN clientSupplierSync cs ON cs.idClientSupplier = s.id + AND cs.Type ='P' + WHERE cs.idClientSupplier IS NULL; CALL clientSupplier_add(vCompanyFk); From ba48d93c1e97cd94f8ef2e5a60f1e9dc8bd89c88 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 20 Jun 2024 23:28:11 +0200 Subject: [PATCH 07/12] perf(salix): refs #6264 #6264 remove save token as debug row --- back/methods/vn-user/renew-token.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index ae554d398..ae2d36e3e 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -16,44 +16,44 @@ module.exports = Self => { accessScopes: ['DEFAULT', 'read:multimedia']}); Self.renewToken = async function(ctx) { - let accessToken; - let token; + let createTokenOptions = {}; + let token; let isNotExceeded; try { token = ctx.req.accessToken; + const {courtesyTime} = await models.AccessTokenConfig.findOne({ fields: ['courtesyTime'] }); - const isNotExceeded = await Self.validateToken(ctx); + isNotExceeded = await Self.validateToken(ctx); if (isNotExceeded) return token; // Schedule to remove current token setTimeout(async() => { + let exists; try { - const exists = await models.AccessToken.findById(token.id); + exists = await models.AccessToken.findById(token.id); exists && await Self.logout(token.id); } catch (error) { // eslint-disable-next-line no-console console.error(error); - const body = JSON.stringify({err: error, token}); + const body = {error: error.message, now: Date.now(), userId: token?.userId ?? null, exists}; await handleError(body); throw new Error(error); } }, courtesyTime * 1000); // Get scopes - - let createTokenOptions = {}; const {scopes} = token; if (scopes) createTokenOptions = {scopes: [scopes[0]]}; // Create new accessToken const user = await Self.findById(token.userId); - accessToken = await user.accessTokens.create(createTokenOptions); + const accessToken = await user.accessTokens.create(createTokenOptions); return {id: accessToken.id, ttl: accessToken.ttl}; } catch (error) { - const body = JSON.stringify({error: error.message, token, accessToken}); + const body = {error: error.message, now: Date.now(), userId: token?.userId ?? null, createTokenOptions, isNotExceeded}; await handleError(body); throw new Error(error); } @@ -61,5 +61,6 @@ module.exports = Self => { }; async function handleError(body, tag = 'renewToken') { + body = JSON.stringify(body); await models.Application.rawSql('CALL util.debugAdd(?,?);', [tag, body]); } From 13952f60e178ef6a147fe8f98cdd5e84aafce9c0 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Fri, 21 Jun 2024 07:18:10 +0200 Subject: [PATCH 08/12] feat boxPicking refs #7357 --- back/models/expedition_PrintOut.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/back/models/expedition_PrintOut.json b/back/models/expedition_PrintOut.json index 6f521cda3..23a2fdbc4 100644 --- a/back/models/expedition_PrintOut.json +++ b/back/models/expedition_PrintOut.json @@ -13,12 +13,7 @@ "description": "id expeditionFk" }, "itemFk": { - "type": "number", - "required": true - }, - "shelvingFk": { - "type": "string", - "required": true + "type": "number" } } } \ No newline at end of file From ea0b0dc779f027491ce6c2eccea1ba4b3e32d493 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 24 Jun 2024 08:08:39 +0200 Subject: [PATCH 09/12] fix: business overlapping --- .../vn/triggers/business_beforeUpdate.sql | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/db/routines/vn/triggers/business_beforeUpdate.sql b/db/routines/vn/triggers/business_beforeUpdate.sql index 4b7a10041..7dc69bc75 100644 --- a/db/routines/vn/triggers/business_beforeUpdate.sql +++ b/db/routines/vn/triggers/business_beforeUpdate.sql @@ -12,23 +12,21 @@ BEGIN END IF; IF !(OLD.started <=> NEW.started AND OLD.ended <=> NEW.ended) THEN - - SELECT COUNT(*) > 0 INTO isOverlapping - FROM business b - WHERE (util.hasDateOverlapped( - NEW.started, - IFNULL(NEW.ended, b.started), - b.started, - IFNULL(b.ended, NEW.started)) - OR (NEW.ended <=> NULL AND b.ended <=> NULL)) - AND b.id <> OLD.id - AND workerFk = OLD.workerFk; + SELECT util.hasDateOverlapped( + started, + ended, + NEW.started, + IFNULL(NEW.ended, b.started) + ) isOverlapped INTO isOverlapping + FROM vn.business b + WHERE workerFk = NEW.workerFK + AND b.id <> NEW.id + ORDER BY isOverlapped DESC + LIMIT 1; IF isOverlapping THEN CALL util.throw ('IS_OVERLAPPING'); END IF; - END IF; - END$$ DELIMITER ; From 8c5f468087cd7f50ac00d574961f1c556441c0a6 Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 24 Jun 2024 10:30:25 +0200 Subject: [PATCH 10/12] tested proc --- .../supplierPackaging_ReportSource.sql | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index a3401843a..2426417c5 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -1,14 +1,14 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( +CREATE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( vFromDated DATE, vSupplierFk INT ) BEGIN /** -* Selecciona los embalajes de un proveedor a partir de una fecha +* Create a report with packaging balance * -* @param vFromDated Fecha de la que partir -* @param vSupplierFk Id del proveedor +* @param vFromDated Starting date +* @param vSupplierFk Supplier ID */ SET @vBalance = 0; SET @vItemFk = NULL; @@ -22,7 +22,7 @@ BEGIN landed, `in`, `out`, - warehouse, + sref, buyingValue, IF ( NOT (@vItemFk <=> sub.itemFk), @@ -31,19 +31,20 @@ BEGIN ) balance, @vItemFk := sub.itemFk previousItemFk FROM ( - SELECT supplierFk, - itemFk, - longName, - supplier, - CONCAT('E',entryFk) entryFk, - landed, - `in`, - `out`, - warehouse, - buyingValue - FROM supplierPackaging - WHERE supplierFk = vSupplierFk - AND landed >= vFromDated + SELECT sp.supplierFk, + sp.itemFk, + sp.longName, + sp.supplier, + CONCAT('E',sp.entryFk) entryFk, + sp.landed, + sp.`in`, + sp.`out`, + e.invoiceNumber sref, + sp.buyingValue + FROM supplierPackaging sp + JOIN entry e ON e.id = sp.entryFk + WHERE sp.supplierFk = vSupplierFk + AND sp.landed >= vFromDated UNION ALL SELECT vSupplierFk, itemFk, @@ -68,7 +69,7 @@ BEGIN DATE(t.shipped), -LEAST(s.quantity,0) `in`, GREATEST(s.quantity,0) `out`, - t.warehouseFk, + t.cmrFk, s.price * (100 - s.discount) / 100 FROM sale s JOIN item i ON i.id = s.itemFk @@ -99,6 +100,7 @@ BEGIN WHERE su.id = vSupplierFk AND t.shipped < vFromDated AND p.isPackageReturnable + AND NOT t.isDeleted GROUP BY s.itemFk UNION ALL SELECT vSupplierFk, @@ -109,7 +111,7 @@ BEGIN DATE(t.shipped), -LEAST(tp.quantity,0) `in`, GREATEST(tp.quantity,0) `out`, - t.warehouseFk, + t.cmrFk, 0 FROM ticketPackaging tp JOIN packaging p ON p.id = tp.packagingFk @@ -138,8 +140,9 @@ BEGIN JOIN client c ON c.id = t.clientFk JOIN supplier su ON su.nif = c.fi WHERE su.id = vSupplierFk - AND t.shipped >= vFromDated + AND t.shipped < vFromDated AND p.isPackageReturnable + AND NOT t.isDeleted GROUP BY p.itemFk ORDER BY itemFk, landed, entryFk ) sub @@ -153,7 +156,7 @@ BEGIN landed, CAST(`in` AS DECIMAL(10,0)) `in`, CAST(`out` AS DECIMAL(10,0)) `out`, - warehouse, + sref, buyingValue, balance FROM tSupplierPackaging From f999010c6c670fa20c35814e3741d8eb59f008f9 Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 24 Jun 2024 10:32:12 +0200 Subject: [PATCH 11/12] tested proc --- .../supplierPackaging_ReportSource.sql | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index a3401843a..63285203b 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -5,10 +5,10 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_R ) BEGIN /** -* Selecciona los embalajes de un proveedor a partir de una fecha +* Create a report with packaging balance * -* @param vFromDated Fecha de la que partir -* @param vSupplierFk Id del proveedor +* @param vFromDated Starting date +* @param vSupplierFk Supplier ID */ SET @vBalance = 0; SET @vItemFk = NULL; @@ -22,7 +22,7 @@ BEGIN landed, `in`, `out`, - warehouse, + sref, buyingValue, IF ( NOT (@vItemFk <=> sub.itemFk), @@ -31,19 +31,20 @@ BEGIN ) balance, @vItemFk := sub.itemFk previousItemFk FROM ( - SELECT supplierFk, - itemFk, - longName, - supplier, - CONCAT('E',entryFk) entryFk, - landed, - `in`, - `out`, - warehouse, - buyingValue - FROM supplierPackaging - WHERE supplierFk = vSupplierFk - AND landed >= vFromDated + SELECT sp.supplierFk, + sp.itemFk, + sp.longName, + sp.supplier, + CONCAT('E',sp.entryFk) entryFk, + sp.landed, + sp.`in`, + sp.`out`, + e.invoiceNumber sref, + sp.buyingValue + FROM supplierPackaging sp + JOIN entry e ON e.id = sp.entryFk + WHERE sp.supplierFk = vSupplierFk + AND sp.landed >= vFromDated UNION ALL SELECT vSupplierFk, itemFk, @@ -68,7 +69,7 @@ BEGIN DATE(t.shipped), -LEAST(s.quantity,0) `in`, GREATEST(s.quantity,0) `out`, - t.warehouseFk, + t.cmrFk, s.price * (100 - s.discount) / 100 FROM sale s JOIN item i ON i.id = s.itemFk @@ -99,6 +100,7 @@ BEGIN WHERE su.id = vSupplierFk AND t.shipped < vFromDated AND p.isPackageReturnable + AND NOT t.isDeleted GROUP BY s.itemFk UNION ALL SELECT vSupplierFk, @@ -109,7 +111,7 @@ BEGIN DATE(t.shipped), -LEAST(tp.quantity,0) `in`, GREATEST(tp.quantity,0) `out`, - t.warehouseFk, + t.cmrFk, 0 FROM ticketPackaging tp JOIN packaging p ON p.id = tp.packagingFk @@ -138,8 +140,9 @@ BEGIN JOIN client c ON c.id = t.clientFk JOIN supplier su ON su.nif = c.fi WHERE su.id = vSupplierFk - AND t.shipped >= vFromDated + AND t.shipped < vFromDated AND p.isPackageReturnable + AND NOT t.isDeleted GROUP BY p.itemFk ORDER BY itemFk, landed, entryFk ) sub @@ -153,7 +156,7 @@ BEGIN landed, CAST(`in` AS DECIMAL(10,0)) `in`, CAST(`out` AS DECIMAL(10,0)) `out`, - warehouse, + sref, buyingValue, balance FROM tSupplierPackaging From 5f329fde38055a153436297a05f9145c8c82959c Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 24 Jun 2024 10:32:51 +0200 Subject: [PATCH 12/12] or replace --- db/routines/vn/procedures/supplierPackaging_ReportSource.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index 2426417c5..63285203b 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -1,5 +1,5 @@ DELIMITER $$ -CREATE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplierPackaging_ReportSource`( vFromDated DATE, vSupplierFk INT )