diff --git a/db/changes/10440-fallas/00-manaCustomerUpdate.sql b/db/changes/10440-fallas/00-manaCustomerUpdate.sql index 69807443a..80838bca2 100644 --- a/db/changes/10440-fallas/00-manaCustomerUpdate.sql +++ b/db/changes/10440-fallas/00-manaCustomerUpdate.sql @@ -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), diff --git a/db/changes/10440-fallas/00-manaSpellersRequery.sql b/db/changes/10440-fallas/00-manaSpellersRequery.sql index e762750e1..9c1a10c6a 100644 --- a/db/changes/10440-fallas/00-manaSpellersRequery.sql +++ b/db/changes/10440-fallas/00-manaSpellersRequery.sql @@ -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 diff --git a/db/changes/10440-fallas/00-ticketRefund.sql b/db/changes/10440-fallas/00-ticketRefund.sql index f8b2162b4..66de21e91 100644 --- a/db/changes/10440-fallas/00-ticketRefund.sql +++ b/db/changes/10440-fallas/00-ticketRefund.sql @@ -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; diff --git a/print/methods/schedule/invoice.js b/print/methods/schedule/invoice.js index ac3c989ab..7128cebbd 100644 --- a/print/methods/schedule/invoice.js +++ b/print/methods/schedule/invoice.js @@ -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 = ? diff --git a/print/templates/email/buyer-week-waste/sql/wasteWeekly.sql b/print/templates/email/buyer-week-waste/sql/wasteWeekly.sql index c8152a1aa..943c085d0 100644 --- a/print/templates/email/buyer-week-waste/sql/wasteWeekly.sql +++ b/print/templates/email/buyer-week-waste/sql/wasteWeekly.sql @@ -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; \ No newline at end of file diff --git a/print/templates/email/osticket-report/sql/dateRange.sql b/print/templates/email/osticket-report/sql/dateRange.sql index d50536ce6..47e9d2f8a 100644 --- a/print/templates/email/osticket-report/sql/dateRange.sql +++ b/print/templates/email/osticket-report/sql/dateRange.sql @@ -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'), diff --git a/print/templates/reports/driver-route/sql/tickets.sql b/print/templates/reports/driver-route/sql/tickets.sql index 11254cee5..8806a0473 100644 --- a/print/templates/reports/driver-route/sql/tickets.sql +++ b/print/templates/reports/driver-route/sql/tickets.sql @@ -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