From abd6045bf681127d29506a62642fd863cef3039a Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 7 Aug 2023 13:52:46 +0200 Subject: [PATCH 1/3] warnFix: revert(version): remove changelog and change package.json --- CHANGELOG.md | 8 -------- db/changes/233401/.gitkeep | 0 package.json | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 db/changes/233401/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d8517de..6399235de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [2334.01] - 2023-08-24 - -### Added - -### Changed - -### Fixed - ## [2332.01] - 2023-08-09 diff --git a/db/changes/233401/.gitkeep b/db/changes/233401/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/package.json b/package.json index 2aa37379e..37e39d5a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "23.34.01", + "version": "23.32.01", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0", From bf5b421a4312d5473082fd68c5c847303d4a2d63 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 08:39:13 +0200 Subject: [PATCH 2/3] refs #5976 warnFix(client_create): socialName to upperCase --- db/changes/233202/00-client_create_upper.sql | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 db/changes/233202/00-client_create_upper.sql diff --git a/db/changes/233202/00-client_create_upper.sql b/db/changes/233202/00-client_create_upper.sql new file mode 100644 index 000000000..d5d7258a1 --- /dev/null +++ b/db/changes/233202/00-client_create_upper.sql @@ -0,0 +1,87 @@ +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 defaultPayMethodFk, + defaultDueDay, + defaultCredit, + defaultIsTaxDataChecked, + defaultHasCoreVnl, + defaultMandateTypeFk + INTO vPayMethodFk, + vDueDay, + vDefaultCredit, + vIsTaxDataChecked, + vHasCoreVnl, + vMandateTypeFk + FROM clientConfig; + + 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 = UPPER(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 id + FROM mandate + WHERE clientFk = vUserFk + AND companyFk = vCompanyFk + AND mandateTypeFk = vMandateTypeFk + ); +END$$ +DELIMITER ; From 61e3b71bbf7f51b22686f6e49c46b2a5a7069687 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 8 Aug 2023 08:51:03 +0200 Subject: [PATCH 3/3] init version 233401 after revert(version) in test --- CHANGELOG.md | 9 +++++++++ db/changes/233401/.gitkeep | 0 package.json | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/changes/233401/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 6399235de..15fe58d7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2334.01] - 2023-08-24 + +### Added + +### Changed + +### Fixed + + ## [2332.01] - 2023-08-09 ### Added diff --git a/db/changes/233401/.gitkeep b/db/changes/233401/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/package.json b/package.json index 37e39d5a5..2aa37379e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "23.32.01", + "version": "23.34.01", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0",