From f6c4ef815037bb61208b9fbd733f441720e69e62 Mon Sep 17 00:00:00 2001 From: joan Date: Mon, 7 Jun 2021 07:32:07 +0200 Subject: [PATCH 1/2] HOTFIX: Compatible SQL with MySQL --- print/templates/email/osticket-report/sql/dateRange.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/print/templates/email/osticket-report/sql/dateRange.sql b/print/templates/email/osticket-report/sql/dateRange.sql index 5307a7567..47e9d2f8a 100644 --- a/print/templates/email/osticket-report/sql/dateRange.sql +++ b/print/templates/email/osticket-report/sql/dateRange.sql @@ -3,6 +3,6 @@ FROM ( SELECT @lastWeek := DATE_ADD(CURDATE(), INTERVAL -1 WEEK), @lastWeekMonday := DATE_ADD(@lastWeek, INTERVAL (-WEEKDAY(@lastWeek)) DAY), @lastWeekFriday := DATE_ADD(@lastWeekMonday, INTERVAL (+6) DAY), - @lastWeekMondayTime := ADDTIME(DATE(@lastWeekMonday), '00:00:00'), - @lastWeekFridayTime := ADDTIME(DATE(@lastWeekFriday), '23:59:59') + @lastWeekMondayTime := CONCAT(@lastWeekMonday, ' 00:00:00'), + @lastWeekFridayTime := CONCAT(@lastWeekFriday, ' 23:59:59') ) t \ No newline at end of file From c90fa41fae7803fb1dfc564c4afe6eda89b9829f Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 7 Jun 2021 07:57:46 +0200 Subject: [PATCH 2/2] accountingType.isAutoConciliated == true --- modules/client/back/methods/client/createReceipt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/client/back/methods/client/createReceipt.js b/modules/client/back/methods/client/createReceipt.js index cb7d7aaba..7eb47e70a 100644 --- a/modules/client/back/methods/client/createReceipt.js +++ b/modules/client/back/methods/client/createReceipt.js @@ -93,7 +93,7 @@ module.exports = function(Self) { clientOriginal.accountingAccount ], options); - } else { + } else if (accountingType.isAutoConciliated == true) { const description = `${clientOriginal.id} : ${clientOriginal.socialName} - ${accountingType.receiptDescription}`; const [xdiarioNew] = await Self.rawSql( `SELECT xdiario_new(?, CURDATE(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ledger;`,