From e7419042505ea6259f0ee814a172131ea40ec744 Mon Sep 17 00:00:00 2001 From: pablone Date: Tue, 20 Jun 2023 17:01:06 +0200 Subject: [PATCH 01/11] refs #5347 --- db/changes/232601/00-client_create.sql | 113 ++++++++++++++++++++++ modules/worker/back/methods/worker/new.js | 2 +- 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 db/changes/232601/00-client_create.sql diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql new file mode 100644 index 000000000..9e2c55c40 --- /dev/null +++ b/db/changes/232601/00-client_create.sql @@ -0,0 +1,113 @@ +DROP PROCEDURE IF EXISTS vn.clientCreate; + +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_create`( + vFirstname VARCHAR(50), + vSurnames VARCHAR(50), + vFi VARCHAR(9), + vAddress TEXT, + vPostcode CHAR(5), + vCity VARCHAR(25), + vProvinceFk SMALLINT(5), + vCompanyFk SMALLINT(5), + vPhone VARCHAR(11), + vEmail VARCHAR(255), + vUserFk INT) +BEGIN +/** + * Create new client + * + * @params vFirstname firstName + * @params vSurnames surnames + * @params vFi company code from accounting transactions + * @params vAddress address + * @params vPostcode postCode + * @params vCity city + * @params vProvinceFk province + * @params vCompanyFk company in which he has become a client + * @params vPhone telephone number + * @params vEmail email address + * @params vUserFk user id + */ + DECLARE vPayMethodFk INT; + DECLARE vDueDay INT; + DECLARE vDefaultCredit DECIMAL(10, 2); + DECLARE vIsTaxDataChecked TINYINT(1); + DECLARE vHasCoreVnl BOOLEAN; + DECLARE vMandateTypeFk INT; + + SELECT payMethodFk, + dueDay, + credit, + isTaxDataChecked, + hasCoreVnl, + mandateTypeFk + INTO vPayMethodFk, + vDueDay, + vDefaultCredit, + vIsTaxDataChecked, + vHasCoreVnl, + vMandateTypeFk + FROM clientNewConfig; + + INSERT INTO `client` + SET id = vUserFk, + name = CONCAT(vFirstname, ' ', vSurnames), + street = vAddress, + fi = TRIM(vFi), + phone = vPhone, + email = vEmail, + provinceFk = vProvinceFk, + city = vCity, + postcode = vPostcode, + socialName = CONCAT(vSurnames, ' ', vFirstname), + payMethodFk = vPayMethodFk, + dueDay = vDueDay, + credit = vDefaultCredit, + isTaxDataChecked = vIsTaxDataChecked, + hasCoreVnl = vHasCoreVnl, + isEqualizated = FALSE + ON duplicate KEY UPDATE + payMethodFk = vPayMethodFk, + dueDay = vDueDay, + credit = vDefaultCredit, + isTaxDataChecked = vIsTaxDataChecked, + hasCoreVnl = vHasCoreVnl, + isActive = TRUE; + + INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) + SELECT vUserFk, vCompanyFk, vMandateTypeFk + WHERE NOT EXISTS ( + SELECT 1 + FROM mandate + WHERE clientFk = vUserFk + AND companyFk = vCompanyFk + AND mandateTypeFk = vMandateTypeFk + ); +END$$ +DELIMITER ; + +CREATE TABLE IF NOT EXISTS vn.clientNewConfig ( + id int unsigned auto_increment NULL, + payMethodFk tinyint(3) unsigned NULL, + dueDay int unsigned NULL, + credit decimal(10, 2) NULL, + isTaxDataChecked tinyint(1) NULL, + hasCoreVnl boolean NULL, + mandateTypeFk smallint(5) NULL, + CONSTRAINT clientNewConfig_PK PRIMARY KEY (id), + CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (payMethodFk) REFERENCES vn.payMethod(id), + CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (mandateTypeFk) REFERENCES vn.mandateType(id) +) +ENGINE=InnoDB +DEFAULT CHARSET=utf8mb3 +COLLATE=utf8mb3_unicode_ci; + +INSERT IGNORE INTO vn.clientNewConfig + SET id = 1, + payMethodFk = 4, + dueDay = 5, + credit = 300.0, + isTaxDataChecked = 1, + hasCoreVnl = 1, + mandateTypeFk = 2; \ No newline at end of file diff --git a/modules/worker/back/methods/worker/new.js b/modules/worker/back/methods/worker/new.js index 27acc98ab..199a3be62 100644 --- a/modules/worker/back/methods/worker/new.js +++ b/modules/worker/back/methods/worker/new.js @@ -171,7 +171,7 @@ module.exports = Self => { throw new UserError(`That payment method requires an IBAN`); await models.Worker.rawSql( - 'CALL vn.clientCreate(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', + 'CALL vn.client_create(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [ args.firstName, args.lastNames, From 27946c0062c2ee8b78046f85e3a1386a067a6894 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 22 Jun 2023 15:00:15 +0200 Subject: [PATCH 02/11] Refs #5347 --- db/changes/232601/00-client_create.sql | 54 +++++++++++--------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index 9e2c55c40..e43eb7b38 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -36,19 +36,19 @@ BEGIN DECLARE vHasCoreVnl BOOLEAN; DECLARE vMandateTypeFk INT; - SELECT payMethodFk, - dueDay, - credit, - isTaxDataChecked, - hasCoreVnl, - mandateTypeFk + SELECT dafaultPayMethodFk, + defaultDueDay, + defaultCredit, + defaultIsTaxDataChecked, + defaultHasCoreVnl, + defaultMandateTypeFk INTO vPayMethodFk, vDueDay, vDefaultCredit, vIsTaxDataChecked, vHasCoreVnl, vMandateTypeFk - FROM clientNewConfig; + FROM clientConfig; INSERT INTO `client` SET id = vUserFk, @@ -78,7 +78,7 @@ BEGIN INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) SELECT vUserFk, vCompanyFk, vMandateTypeFk WHERE NOT EXISTS ( - SELECT 1 + SELECT id FROM mandate WHERE clientFk = vUserFk AND companyFk = vCompanyFk @@ -87,27 +87,19 @@ BEGIN END$$ DELIMITER ; -CREATE TABLE IF NOT EXISTS vn.clientNewConfig ( - id int unsigned auto_increment NULL, - payMethodFk tinyint(3) unsigned NULL, - dueDay int unsigned NULL, - credit decimal(10, 2) NULL, - isTaxDataChecked tinyint(1) NULL, - hasCoreVnl boolean NULL, - mandateTypeFk smallint(5) NULL, - CONSTRAINT clientNewConfig_PK PRIMARY KEY (id), - CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (payMethodFk) REFERENCES vn.payMethod(id), - CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (mandateTypeFk) REFERENCES vn.mandateType(id) -) -ENGINE=InnoDB -DEFAULT CHARSET=utf8mb3 -COLLATE=utf8mb3_unicode_ci; +ALTER TABLE vn.clientConfig ADD dafaultPayMethodFk tinyint(3) unsigned NULL; +ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; +ALTER TABLE vn.clientConfig ADD defaultCredit decimal(10, 2) NULL; +ALTER TABLE vn.clientConfig ADD defaultIsTaxDataChecked tinyint(1) NULL; +ALTER TABLE vn.clientConfig ADD defaultHasCoreVnl boolean NULL; +ALTER TABLE vn.clientConfig ADD defaultMandateTypeFk smallint(5) NULL; +ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (dafaultPayMethodFk) REFERENCES vn.payMethod(id); +ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); -INSERT IGNORE INTO vn.clientNewConfig - SET id = 1, - payMethodFk = 4, - dueDay = 5, - credit = 300.0, - isTaxDataChecked = 1, - hasCoreVnl = 1, - mandateTypeFk = 2; \ No newline at end of file +UPDATE vn.clientConfig + SET dafaultPayMethodFk = 4, + defaultDueDay = 5, + defaultCredit = 300.0, + defaultIsTaxDataChecked = 1, + defaultHasCoreVnl = 1, + defaultMandateTypeFk = 2; \ No newline at end of file From f6cc59eafb654ace68fc11f39962cba7ff69899d Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 22 Jun 2023 16:23:36 +0200 Subject: [PATCH 03/11] refs #5347 --- db/changes/232601/00-client_create.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index e43eb7b38..d7e997045 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -42,12 +42,12 @@ BEGIN defaultIsTaxDataChecked, defaultHasCoreVnl, defaultMandateTypeFk - INTO vPayMethodFk, - vDueDay, - vDefaultCredit, - vIsTaxDataChecked, - vHasCoreVnl, - vMandateTypeFk + INTO vPayMethodFk, + vDueDay, + vDefaultCredit, + vIsTaxDataChecked, + vHasCoreVnl, + vMandateTypeFk FROM clientConfig; INSERT INTO `client` From f0fec2cdd63e3cac574be1c6d9c74f6209f98de9 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 22 Jun 2023 17:46:21 +0200 Subject: [PATCH 04/11] refs #5347 --- db/changes/232601/00-client_create.sql | 17 ----------------- db/changes/232601/00-client_create2.sql | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 db/changes/232601/00-client_create2.sql diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index d7e997045..159ef99d6 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -86,20 +86,3 @@ BEGIN ); END$$ DELIMITER ; - -ALTER TABLE vn.clientConfig ADD dafaultPayMethodFk tinyint(3) unsigned NULL; -ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; -ALTER TABLE vn.clientConfig ADD defaultCredit decimal(10, 2) NULL; -ALTER TABLE vn.clientConfig ADD defaultIsTaxDataChecked tinyint(1) NULL; -ALTER TABLE vn.clientConfig ADD defaultHasCoreVnl boolean NULL; -ALTER TABLE vn.clientConfig ADD defaultMandateTypeFk smallint(5) NULL; -ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (dafaultPayMethodFk) REFERENCES vn.payMethod(id); -ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); - -UPDATE vn.clientConfig - SET dafaultPayMethodFk = 4, - defaultDueDay = 5, - defaultCredit = 300.0, - defaultIsTaxDataChecked = 1, - defaultHasCoreVnl = 1, - defaultMandateTypeFk = 2; \ No newline at end of file diff --git a/db/changes/232601/00-client_create2.sql b/db/changes/232601/00-client_create2.sql new file mode 100644 index 000000000..48f669d37 --- /dev/null +++ b/db/changes/232601/00-client_create2.sql @@ -0,0 +1,17 @@ + +ALTER TABLE vn.clientConfig ADD dafaultPayMethodFk tinyint(3) unsigned NULL; +ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; +ALTER TABLE vn.clientConfig ADD defaultCredit decimal(10, 2) NULL; +ALTER TABLE vn.clientConfig ADD defaultIsTaxDataChecked tinyint(1) NULL; +ALTER TABLE vn.clientConfig ADD defaultHasCoreVnl boolean NULL; +ALTER TABLE vn.clientConfig ADD defaultMandateTypeFk smallint(5) NULL; +ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (dafaultPayMethodFk) REFERENCES vn.payMethod(id); +ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); + +UPDATE vn.clientConfig + SET dafaultPayMethodFk = 4, + defaultDueDay = 5, + defaultCredit = 300.0, + defaultIsTaxDataChecked = 1, + defaultHasCoreVnl = 1, + defaultMandateTypeFk = 2; \ No newline at end of file From 203e80afa894d301c48415f3cbe5adc0dc57772b Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 22 Jun 2023 17:56:45 +0200 Subject: [PATCH 05/11] refs #5347 --- db/changes/232601/00-client_create.sql | 3 ++- db/changes/232601/00-client_create2.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index 159ef99d6..42dd353ba 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -12,7 +12,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`client_create`( vCompanyFk SMALLINT(5), vPhone VARCHAR(11), vEmail VARCHAR(255), - vUserFk INT) + vUserFk INT +) BEGIN /** * Create new client diff --git a/db/changes/232601/00-client_create2.sql b/db/changes/232601/00-client_create2.sql index 48f669d37..1191cc21c 100644 --- a/db/changes/232601/00-client_create2.sql +++ b/db/changes/232601/00-client_create2.sql @@ -1,3 +1,4 @@ +DROP PROCEDURE IF EXISTS vn.clientCreate; ALTER TABLE vn.clientConfig ADD dafaultPayMethodFk tinyint(3) unsigned NULL; ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; From 6e52b3b968bf8546936a3cf1754b87177c2b3146 Mon Sep 17 00:00:00 2001 From: pablone Date: Wed, 28 Jun 2023 14:07:37 +0200 Subject: [PATCH 06/11] refs #5347 --- db/changes/232601/00-client_create.sql | 12 ++++++------ db/changes/232601/00-client_create2.sql | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index 42dd353ba..0728ba05e 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -37,18 +37,18 @@ BEGIN DECLARE vHasCoreVnl BOOLEAN; DECLARE vMandateTypeFk INT; - SELECT dafaultPayMethodFk, + SELECT defaultPayMethodFk, defaultDueDay, defaultCredit, defaultIsTaxDataChecked, defaultHasCoreVnl, defaultMandateTypeFk INTO vPayMethodFk, - vDueDay, - vDefaultCredit, - vIsTaxDataChecked, - vHasCoreVnl, - vMandateTypeFk + vDueDay, + vDefaultCredit, + vIsTaxDataChecked, + vHasCoreVnl, + vMandateTypeFk FROM clientConfig; INSERT INTO `client` diff --git a/db/changes/232601/00-client_create2.sql b/db/changes/232601/00-client_create2.sql index 1191cc21c..99e25fdc8 100644 --- a/db/changes/232601/00-client_create2.sql +++ b/db/changes/232601/00-client_create2.sql @@ -1,6 +1,6 @@ DROP PROCEDURE IF EXISTS vn.clientCreate; -ALTER TABLE vn.clientConfig ADD dafaultPayMethodFk tinyint(3) unsigned NULL; +ALTER TABLE vn.clientConfig ADD defaultPayMethodFk tinyint(3) unsigned NULL; ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; ALTER TABLE vn.clientConfig ADD defaultCredit decimal(10, 2) NULL; ALTER TABLE vn.clientConfig ADD defaultIsTaxDataChecked tinyint(1) NULL; @@ -10,7 +10,7 @@ ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN K ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); UPDATE vn.clientConfig - SET dafaultPayMethodFk = 4, + SET defaultPayMethodFk = 4, defaultDueDay = 5, defaultCredit = 300.0, defaultIsTaxDataChecked = 1, From be1c145d9a08d53d9c8170454c25d9b95bf7f126 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 29 Jun 2023 10:41:41 +0200 Subject: [PATCH 08/11] refs #5347 --- db/changes/232601/00-client_create.sql | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232601/00-client_create.sql index 0728ba05e..f31a8e348 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232601/00-client_create.sql @@ -76,14 +76,12 @@ BEGIN hasCoreVnl = vHasCoreVnl, isActive = TRUE; - INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) - SELECT vUserFk, vCompanyFk, vMandateTypeFk - WHERE NOT EXISTS ( - SELECT id - FROM mandate - WHERE clientFk = vUserFk - AND companyFk = vCompanyFk - AND mandateTypeFk = vMandateTypeFk - ); + IF (SELECT COUNT(*) + FROM mandate + WHERE clientFk = vUserFk + AND companyFk = vCompanyFk + AND mandateTypeFk = vMandateTypeFk) = 0 THEN + INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) + VALUES (vUserFk, vCompanyFk, vMandateTypeFk); END$$ DELIMITER ; From 9fe7024d1792561d8de7b525e24e7fa2feb4b2ff Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 3 Jul 2023 14:08:50 +0200 Subject: [PATCH 09/11] refs #5347 --- .../{232601 => 232801}/00-client_create.sql | 16 +++++++++------- .../{232601 => 232801}/00-client_create2.sql | 7 +++---- 2 files changed, 12 insertions(+), 11 deletions(-) rename db/changes/{232601 => 232801}/00-client_create.sql (87%) rename db/changes/{232601 => 232801}/00-client_create2.sql (89%) diff --git a/db/changes/232601/00-client_create.sql b/db/changes/232801/00-client_create.sql similarity index 87% rename from db/changes/232601/00-client_create.sql rename to db/changes/232801/00-client_create.sql index f31a8e348..0728ba05e 100644 --- a/db/changes/232601/00-client_create.sql +++ b/db/changes/232801/00-client_create.sql @@ -76,12 +76,14 @@ BEGIN hasCoreVnl = vHasCoreVnl, isActive = TRUE; - IF (SELECT COUNT(*) - FROM mandate - WHERE clientFk = vUserFk - AND companyFk = vCompanyFk - AND mandateTypeFk = vMandateTypeFk) = 0 THEN - INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) - VALUES (vUserFk, vCompanyFk, vMandateTypeFk); + INSERT INTO mandate (clientFk, companyFk, mandateTypeFk) + SELECT vUserFk, vCompanyFk, vMandateTypeFk + WHERE NOT EXISTS ( + SELECT id + FROM mandate + WHERE clientFk = vUserFk + AND companyFk = vCompanyFk + AND mandateTypeFk = vMandateTypeFk + ); END$$ DELIMITER ; diff --git a/db/changes/232601/00-client_create2.sql b/db/changes/232801/00-client_create2.sql similarity index 89% rename from db/changes/232601/00-client_create2.sql rename to db/changes/232801/00-client_create2.sql index 99e25fdc8..d3b7407ed 100644 --- a/db/changes/232601/00-client_create2.sql +++ b/db/changes/232801/00-client_create2.sql @@ -1,5 +1,3 @@ -DROP PROCEDURE IF EXISTS vn.clientCreate; - ALTER TABLE vn.clientConfig ADD defaultPayMethodFk tinyint(3) unsigned NULL; ALTER TABLE vn.clientConfig ADD defaultDueDay int unsigned NULL; ALTER TABLE vn.clientConfig ADD defaultCredit decimal(10, 2) NULL; @@ -9,10 +7,11 @@ ALTER TABLE vn.clientConfig ADD defaultMandateTypeFk smallint(5) NULL; ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (dafaultPayMethodFk) REFERENCES vn.payMethod(id); ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); -UPDATE vn.clientConfig +INSERT IGNORE INTO vn.clientConfig SET defaultPayMethodFk = 4, defaultDueDay = 5, defaultCredit = 300.0, defaultIsTaxDataChecked = 1, defaultHasCoreVnl = 1, - defaultMandateTypeFk = 2; \ No newline at end of file + defaultMandateTypeFk = 2 + WHERE id = 1; \ No newline at end of file From 6b557d5d8a5bcd7eb7b1e38f051f2ae2059e015a Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 3 Jul 2023 14:14:25 +0200 Subject: [PATCH 10/11] refs #5347 --- db/changes/232801/00-client_create2.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/changes/232801/00-client_create2.sql b/db/changes/232801/00-client_create2.sql index d3b7407ed..8ba4e78e5 100644 --- a/db/changes/232801/00-client_create2.sql +++ b/db/changes/232801/00-client_create2.sql @@ -7,7 +7,7 @@ ALTER TABLE vn.clientConfig ADD defaultMandateTypeFk smallint(5) NULL; ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigPayMethod_FK FOREIGN KEY (dafaultPayMethodFk) REFERENCES vn.payMethod(id); ALTER TABLE vn.clientConfig ADD CONSTRAINT clientNewConfigMandateType_FK FOREIGN KEY (defaultMandateTypeFk) REFERENCES vn.mandateType(id); -INSERT IGNORE INTO vn.clientConfig +UPDATE vn.clientConfig SET defaultPayMethodFk = 4, defaultDueDay = 5, defaultCredit = 300.0, From 2ccf8d519795bc807230fb429ed5346b2e4767b7 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 3 Jul 2023 14:49:21 +0200 Subject: [PATCH 11/11] refs #5347 --- db/dump/fixtures.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 208eb2c21..c02e3dce4 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -382,9 +382,10 @@ INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`) (1103, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)), (1104, -30, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)); -INSERT INTO `vn`.`clientConfig`(`riskTolerance`, `maxCreditRows`) +INSERT INTO `vn`.`clientConfig`(`id`, `riskTolerance`, `maxCreditRows`, `maxPriceIncreasingRatio`, `riskScope`, `defaultPayMethodFk`, `defaultDueDay`, `defaultCredit`, `defaultIsTaxDataChecked`, `defaultHasCoreVnl`, `defaultMandateTypeFk`) VALUES - (200, 10); + (1, 200, 10, 0.25, 2, 4, 5, 300.00, 1, 1, 2); + INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`) VALUES