fix: refs #7611 & ticket195937 incoterms #2613

Merged
robert merged 9 commits from 195937-icoterms into master 2024-06-25 05:58:31 +00:00
1 changed files with 1 additions and 7 deletions
Showing only changes of commit c42a21bc6f - Show all commits

View File

@ -2,11 +2,6 @@ WITH tickets AS(
SELECT id, packages, addressFk, weight SELECT id, packages, addressFk, weight
FROM ticket FROM ticket
WHERE refFk= ? WHERE refFk= ?
robert marked this conversation as resolved Outdated

refFk a pel??

refFk a pel??
) , weight AS(
SELECT weight
FROM tickets
WHERE weight
LIMIT 1
), volume AS( ), volume AS(
SELECT SUM(volume) volume SELECT SUM(volume) volume
FROM tickets t FROM tickets t
@ -20,7 +15,7 @@ SELECT GROUP_CONCAT(DISTINCT ir.description ORDER BY ir.description SEPARATOR '
)SELECT SUM(t.packages), )SELECT SUM(t.packages),
a.incotermsFk, a.incotermsFk,
ic.name incotermsName, ic.name incotermsName,
w.weight, MAX(t.weight) weight,
ca.fiscalName customsAgentName, ca.fiscalName customsAgentName,
ca.street customsAgentStreet, ca.street customsAgentStreet,
ca.nif customsAgentNif, 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 LEFT JOIN vn.customsAgent ca ON ca.id = a.customsAgentFk
JOIN volume v JOIN volume v
JOIN intrastat i JOIN intrastat i
LEFT JOIN weight w ON TRUE