Merge branch 'master' into 6434-signInLog_issue_MASTER
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
ac3d23579a
|
@ -32,8 +32,7 @@ module.exports = Self => {
|
|||
throw new UserError('You cannot close tickets for today');
|
||||
|
||||
const tickets = await Self.rawSql(`
|
||||
SELECT
|
||||
t.id,
|
||||
SELECT t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
|
@ -42,7 +41,8 @@ module.exports = Self => {
|
|||
c.isToBeMailed,
|
||||
c.hasToInvoice,
|
||||
co.hasDailyInvoice,
|
||||
eu.email salesPersonEmail
|
||||
eu.email salesPersonEmail,
|
||||
t.addressFk
|
||||
FROM ticket t
|
||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||
JOIN warehouse wh ON wh.id = t.warehouseFk AND wh.hasComission
|
||||
|
@ -53,8 +53,7 @@ module.exports = Self => {
|
|||
JOIN country co ON co.id = p.countryFk
|
||||
LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk
|
||||
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code != 'delivered'))
|
||||
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY)
|
||||
AND util.dayEnd(?)
|
||||
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY) AND util.dayEnd(?)
|
||||
AND t.refFk IS NULL
|
||||
GROUP BY t.id
|
||||
`, [toDate, toDate]);
|
||||
|
|
Loading…
Reference in New Issue