quit vn_curdate of sql in print
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
f786cdd33d
commit
7dffe4edcb
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = ?
|
||||
|
|
|
@ -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;
|
|
@ -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'),
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue