Merge pull request '#7356 New parameters for Weekly tickets' (!2757) from 7356_TicketMigration_End_Back into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2757 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
dc9d252a8a
|
@ -53,13 +53,22 @@ module.exports = Self => {
|
|||
const stmts = [];
|
||||
|
||||
const stmt = new ParameterizedSQL(
|
||||
`SELECT t.id AS ticketFk, c.id AS clientFk, c.name AS clientName, tw.weekDay,
|
||||
wh.name AS warehouseName, u.id AS workerFk, u.name AS userName, u.nickName, tw.agencyModeFk
|
||||
`SELECT t.id AS ticketFk,
|
||||
c.id AS clientFk,
|
||||
c.name AS clientName,
|
||||
tw.weekDay,
|
||||
wh.name AS warehouseName,
|
||||
u.id AS workerFk,
|
||||
u.name AS userName,
|
||||
u.nickName,
|
||||
tw.agencyModeFk,
|
||||
am.name agencyModeName
|
||||
FROM ticketWeekly tw
|
||||
JOIN ticket t ON t.id = tw.ticketFk
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
JOIN account.user u ON u.id = c.salesPersonFk
|
||||
JOIN warehouse wh ON wh.id = t.warehouseFk`
|
||||
JOIN warehouse wh ON wh.id = t.warehouseFk
|
||||
LEFT JOIN agencyMode am ON am.id = tw.agencyModeFk`
|
||||
);
|
||||
|
||||
stmt.merge(conn.makeSuffix(filter));
|
||||
|
|
Loading…
Reference in New Issue