refactor: refs #7884 modified sql

This commit is contained in:
Jon Elias 2024-09-30 12:07:55 +02:00
parent 59c6d316dd
commit c680c4a059
1 changed files with 3 additions and 3 deletions

View File

@ -229,19 +229,19 @@ module.exports = Self => {
if (daysAgo && daysOnward) {
sql = `
AND t.shipped >= util.VN_CURDATE() - INTERVAL ? DAY
WHERE t.shipped >= util.VN_CURDATE() - INTERVAL ? DAY
AND t.shipped <= util.VN_CURDATE() + INTERVAL ? DAY
`;
params.push(daysAgo, daysOnward);
} else if (daysAgo) {
sql = `
AND t.shipped >= util.VN_CURDATE() - INTERVAL ? DAY
WHERE t.shipped >= util.VN_CURDATE() - INTERVAL ? DAY
AND t.shipped < util.VN_CURDATE()
`;
params.push(daysAgo);
} else if (daysOnward) {
sql = `
AND t.shipped <= util.VN_CURDATE() + INTERVAL ? DAY
WHERE t.shipped <= util.VN_CURDATE() + INTERVAL ? DAY
AND t.shipped >= util.VN_CURDATE()
`;
params.push(daysOnward);