quit vn_curdate of sql in print
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-06-10 07:58:56 +02:00
parent f786cdd33d
commit 7dffe4edcb
7 changed files with 8 additions and 9 deletions

View File

@ -40,7 +40,7 @@ BEGIN
INTO vFromDated
FROM bs.manaCustomer;
WHILE timestampadd(DAY,30,vFromDated) < vn.VN_CURDATE() DO
WHILE timestampadd(DAY,30,vFromDated) < CURDATE() DO
SELECT
timestampadd(DAY,30,vFromDated),

View File

@ -11,7 +11,7 @@ BEGIN
*/
DECLARE vWorkerIsExcluded BOOLEAN;
DECLARE vFromDated DATE;
DECLARE vToDated DATE DEFAULT TIMESTAMPADD(DAY,1,vn.VN_CURDATE());
DECLARE vToDated DATE DEFAULT TIMESTAMPADD(DAY,1,CURDATE());
DECLARE vMana INT;
DECLARE vAutoMana INT;
DECLARE vClaimMana INT;
@ -63,7 +63,7 @@ BEGIN
FROM greuge g
JOIN client c ON c.id = g.clientFk
WHERE c.salesPersonFk = vWorkerFk AND g.greugeTypeFk = vManaGreugeType
AND g.shipped > vFromDated and g.shipped < vn.VN_CURDATE()
AND g.shipped > vFromDated and g.shipped < CURDATE()
UNION ALL
SELECT cc.mana
FROM clientManaCache cc

View File

@ -51,13 +51,13 @@ BEGIN
)
SELECT
vCustomer,
vn.VN_CURDATE(),
CURDATE(),
vAddress,
vRefundAgencyMode,
a.nickname,
vWarehouse,
vCompany,
vn.VN_CURDATE(),
CURDATE(),
vZoneFk
FROM address a
WHERE a.id = vAddress;

View File

@ -94,7 +94,6 @@ module.exports = async function(request, response, next) {
}
// Update queue status
const date = new Date();
date.setHours(0, 0, 0, 0);
sql = `UPDATE invoiceOut_queue
SET status = "printed",
printed = ?

View File

@ -5,7 +5,7 @@ SELECT *, 100 * dwindle / total AS percentage
sum(saleWaste) as dwindle
FROM bs.waste w
JOIN vn.time t ON w.year = t.year AND w.week = t.week
WHERE t.dated = DATE_ADD(vn.VN_CURDATE(), INTERVAL -1 WEEK)
WHERE t.dated = DATE_ADD(CURDATE(), INTERVAL -1 WEEK)
GROUP BY buyer
) sub
ORDER BY percentage DESC;

View File

@ -1,6 +1,6 @@
SELECT @lastWeekMondayTime AS started, @lastWeekFridayTime AS ended
FROM (
SELECT @lastWeek := DATE_ADD(vn.VN_CURDATE(), INTERVAL -1 WEEK),
SELECT @lastWeek := DATE_ADD(CURDATE(), INTERVAL -1 WEEK),
@lastWeekMonday := DATE_ADD(@lastWeek, INTERVAL (-WEEKDAY(@lastWeek)) DAY),
@lastWeekFriday := DATE_ADD(@lastWeekMonday, INTERVAL (+6) DAY),
@lastWeekMondayTime := CONCAT(@lastWeekMonday, ' 00:00:00'),

View File

@ -24,7 +24,7 @@ FROM route r
LEFT JOIN ticket t ON t.routeFk = r.id
LEFT JOIN address a ON a.id = t.addressFk
LEFT JOIN client c ON c.id = t.clientFk
LEFT JOIN worker w ON w.id = client_getSalesPerson(t.clientFk, vn.VN_CURDATE())
LEFT JOIN worker w ON w.id = client_getSalesPerson(t.clientFk, CURDATE())
LEFT JOIN account.user u ON u.id = w.id
LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id AND tob.observationTypeFk = 3
LEFT JOIN province p ON a.provinceFk = p.id