7691-testToMaster #2703
|
@ -75,14 +75,14 @@ BEGIN
|
||||||
JOIN (
|
JOIN (
|
||||||
WITH entries AS (
|
WITH entries AS (
|
||||||
SELECT e.id, de.duaFk
|
SELECT e.id, de.duaFk
|
||||||
FROM `entry` e
|
FROM vn.`entry` e
|
||||||
JOIN duaEntry de ON de.entryFk = e.id
|
JOIN vn.duaEntry de ON de.entryFk = e.id
|
||||||
WHERE de.duaFk = vDuaFk
|
WHERE de.duaFk = vDuaFk
|
||||||
AND (NOT e.isBooked OR NOT e.isConfirmed)
|
AND (NOT e.isBooked OR NOT e.isConfirmed)
|
||||||
),
|
),
|
||||||
notBookedEntries AS (
|
notBookedEntries AS (
|
||||||
SELECT e.id
|
SELECT e.id
|
||||||
FROM duaEntry
|
FROM vn.duaEntry
|
||||||
WHERE duaFk = vDuaFk
|
WHERE duaFk = vDuaFk
|
||||||
AND NOT customsValue
|
AND NOT customsValue
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue