Merge pull request 'tickets deleted excluded' (!2601) from 7420-supplierPackaging_ReportSource into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2601
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Pako Natek 2024-06-19 05:17:58 +00:00
commit cccc87d211
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ BEGIN
WHERE su.id = vSupplierFk
AND t.shipped < vFromDated
AND p.isPackageReturnable
AND NOT t.isDeleted
GROUP BY s.itemFk
UNION ALL
SELECT vSupplierFk,
@ -140,6 +141,7 @@ BEGIN
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable
AND NOT t.isDeleted
GROUP BY p.itemFk
ORDER BY itemFk, landed, entryFk
) sub