fix: refs #7611 & ticket195937 incoterms #2613
|
@ -2,11 +2,6 @@ WITH tickets AS(
|
|||
SELECT id, packages, addressFk, weight
|
||||
FROM ticket
|
||||
WHERE refFk= ?
|
||||
robert marked this conversation as resolved
Outdated
|
||||
) , weight AS(
|
||||
SELECT weight
|
||||
FROM tickets
|
||||
WHERE weight
|
||||
LIMIT 1
|
||||
), volume AS(
|
||||
SELECT SUM(volume) volume
|
||||
FROM tickets t
|
||||
|
@ -20,7 +15,7 @@ SELECT GROUP_CONCAT(DISTINCT ir.description ORDER BY ir.description SEPARATOR '
|
|||
)SELECT SUM(t.packages),
|
||||
a.incotermsFk,
|
||||
ic.name incotermsName,
|
||||
w.weight,
|
||||
MAX(t.weight) weight,
|
||||
ca.fiscalName customsAgentName,
|
||||
ca.street customsAgentStreet,
|
||||
ca.nif customsAgentNif,
|
||||
|
@ -34,4 +29,3 @@ SELECT GROUP_CONCAT(DISTINCT ir.description ORDER BY ir.description SEPARATOR '
|
|||
LEFT JOIN vn.customsAgent ca ON ca.id = a.customsAgentFk
|
||||
JOIN volume v
|
||||
JOIN intrastat i
|
||||
LEFT JOIN weight w ON TRUE
|
||||
|
|
Loading…
Reference in New Issue
refFk a pel??