refs #6842 deprecated and move
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
9e3b4e8451
commit
59a0cb3f4a
|
@ -17,16 +17,16 @@ BEGIN
|
||||||
DECLARE vRefLen INT;
|
DECLARE vRefLen INT;
|
||||||
DECLARE vRefPrefix VARCHAR(255);
|
DECLARE vRefPrefix VARCHAR(255);
|
||||||
DECLARE vLastRef VARCHAR(255);
|
DECLARE vLastRef VARCHAR(255);
|
||||||
DECLARE vSage200Company INT;
|
DECLARE vCompanyCode INT;
|
||||||
DECLARE vYearLen INT DEFAULT 2;
|
DECLARE vYearLen INT DEFAULT 2;
|
||||||
DECLARE vPrefixLen INT;
|
DECLARE vPrefixLen INT;
|
||||||
|
|
||||||
SELECT sage200Company INTO vSage200Company
|
SELECT companyCode INTO vCompanyCode
|
||||||
FROM company
|
FROM company
|
||||||
WHERE id = NEW.companyFk;
|
WHERE id = NEW.companyFk;
|
||||||
|
|
||||||
IF vSage200Company IS NULL THEN
|
IF vCompanyCode IS NULL THEN
|
||||||
CALL util.throw('vSage200CompanyNotDefined');
|
CALL util.throw('vCompanyCodeNotDefined');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT MAX(i.ref) INTO vLastRef
|
SELECT MAX(i.ref) INTO vLastRef
|
||||||
|
@ -36,7 +36,7 @@ BEGIN
|
||||||
AND i.companyFk = NEW.companyFk;
|
AND i.companyFk = NEW.companyFk;
|
||||||
|
|
||||||
IF vLastRef IS NOT NULL THEN
|
IF vLastRef IS NOT NULL THEN
|
||||||
SET vPrefixLen = LENGTH(NEW.serial) + LENGTH(vSage200Company) + vYearLen;
|
SET vPrefixLen = LENGTH(NEW.serial) + LENGTH(vCompanyCode) + vYearLen;
|
||||||
SET vRefLen = LENGTH(vLastRef) - vPrefixLen;
|
SET vRefLen = LENGTH(vLastRef) - vPrefixLen;
|
||||||
SET vRefPrefix = LEFT(vLastRef, vPrefixLen);
|
SET vRefPrefix = LEFT(vLastRef, vPrefixLen);
|
||||||
SET vRef = RIGHT(vLastRef, vRefLen);
|
SET vRef = RIGHT(vLastRef, vRefLen);
|
||||||
|
@ -44,7 +44,7 @@ BEGIN
|
||||||
SELECT refLen INTO vRefLen FROM invoiceOutConfig;
|
SELECT refLen INTO vRefLen FROM invoiceOutConfig;
|
||||||
SET vRefPrefix = CONCAT(
|
SET vRefPrefix = CONCAT(
|
||||||
NEW.serial,
|
NEW.serial,
|
||||||
vSage200Company,
|
vCompanyCode,
|
||||||
RIGHT(YEAR(NEW.issued), vYearLen)
|
RIGHT(YEAR(NEW.issued), vYearLen)
|
||||||
);
|
);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -1,35 +1,54 @@
|
||||||
-- Auto-generated SQL script #202402151810
|
-- Auto-generated SQL script #202403061303
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=0
|
||||||
WHERE id=69;
|
WHERE id=69;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=0
|
||||||
WHERE id=567;
|
|
||||||
UPDATE vn.company
|
|
||||||
SET companyGroupFk=NULL
|
|
||||||
WHERE id=791;
|
WHERE id=791;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=3
|
||||||
WHERE id=792;
|
WHERE id=792;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=5
|
||||||
WHERE id=965;
|
WHERE id=965;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=7
|
||||||
WHERE id=1381;
|
WHERE id=1381;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=3
|
||||||
WHERE id=1463;
|
WHERE id=1463;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=6
|
||||||
WHERE id=2142;
|
|
||||||
UPDATE vn.company
|
|
||||||
SET companyGroupFk=NULL
|
|
||||||
WHERE id=2292;
|
|
||||||
UPDATE vn.company
|
|
||||||
SET companyGroupFk=NULL
|
|
||||||
WHERE id=2393;
|
WHERE id=2393;
|
||||||
UPDATE vn.company
|
UPDATE vn.company
|
||||||
SET companyGroupFk=NULL
|
SET companyCode=9
|
||||||
WHERE id=3869;
|
WHERE id=3869;
|
||||||
ALTER TABLE vn.company MODIFY COLUMN sage200Company int(2) DEFAULT NULL NULL COMMENT 'Campo para la serie InvoiceOut';
|
|
||||||
|
-- Auto-generated SQL script #202403061303
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=0
|
||||||
|
WHERE id=69;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=0
|
||||||
|
WHERE id=791;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=3
|
||||||
|
WHERE id=792;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=5
|
||||||
|
WHERE id=965;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=7
|
||||||
|
WHERE id=1381;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=3
|
||||||
|
WHERE id=1463;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=6
|
||||||
|
WHERE id=2393;
|
||||||
|
UPDATE vn.company
|
||||||
|
SET companyCode=9
|
||||||
|
WHERE id=3869;
|
||||||
|
|
||||||
|
ALTER TABLE vn.company CHANGE sage200Company sage200Company__ int(2) DEFAULT NULL NULL COMMENT '@deprecated 06/03/2024';
|
||||||
|
ALTER TABLE vn.company MODIFY COLUMN sage200Company__ int(2) DEFAULT NULL NULL COMMENT '@deprecated 06/03/2024';
|
||||||
|
|
Loading…
Reference in New Issue