refactor: refs #7519 Minor change
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-06-03 11:46:52 +02:00
parent 8cef8eace7
commit b8e95c0284
2 changed files with 2 additions and 14 deletions

View File

@ -172,16 +172,14 @@ BEGIN
GROUP BY clientFk GROUP BY clientFk
) sub ON sub.clientFk = cr.clientFk ) sub ON sub.clientFk = cr.clientFk
SET cr.priceIncreasing = GREATEST(0, ROUND(IFNULL(sub.greuge, 0) / SET cr.priceIncreasing = GREATEST(0, ROUND(IFNULL(sub.greuge, 0) /
(IFNULL(cr.yearSale, 0) * vMonthToRefund / 12 ), 3)) (IFNULL(cr.yearSale, 0) * vMonthToRefund / 12 ), 3));
WHERE cr.dated = util.VN_CURDATE();
-- Protección neonatos -- Protección neonatos
UPDATE claimRatio cr UPDATE claimRatio cr
JOIN firstTicketShipped fts ON fts.clientFk = cr.clientFk JOIN firstTicketShipped fts ON fts.clientFk = cr.clientFk
SET cr.priceIncreasing = 0, SET cr.priceIncreasing = 0,
cr.claimingRate = 0 cr.claimingRate = 0
WHERE fts.shipped > util.VN_CURDATE() - INTERVAL 1 MONTH WHERE fts.shipped > util.VN_CURDATE() - INTERVAL 1 MONTH;
AND cr.dated = util.VN_CURDATE();
DROP TEMPORARY TABLE tTicketList; DROP TEMPORARY TABLE tTicketList;
END$$ END$$

View File

@ -1,10 +0,0 @@
UPDATE IGNORE bs.nightTask
SET `procedure` = 'claimRatio_add',
`schema` = 'vn'
WHERE `procedure` = 'claim_ratio_routine';
ALTER TABLE vn.claimRatio ADD dated DATE DEFAULT current_timestamp() NOT NULL;
ALTER TABLE vn.claimRatio CHANGE dated dated DATE DEFAULT current_timestamp() NOT NULL FIRST;
ALTER TABLE vn.claimRatio DROP FOREIGN KEY claimRatio_ibfk_1;
ALTER TABLE vn.claimRatio DROP PRIMARY KEY;
ALTER TABLE vn.claimRatio ADD CONSTRAINT claimRatio_pk PRIMARY KEY (dated,clientFk);