fix: refs #19537 changes required
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Robert Ferrús 2024-06-21 11:47:34 +02:00
parent fb58e8226d
commit c42a21bc6f
1 changed files with 1 additions and 7 deletions

View File

@ -2,11 +2,6 @@ WITH tickets AS(
SELECT id, packages, addressFk, weight
FROM ticket
WHERE refFk= ?
) , 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