Warehouse name
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Pako Natek 2024-06-19 10:45:37 +02:00
parent c989cebbfc
commit 49e01218e9
1 changed files with 4 additions and 2 deletions

View File

@ -68,7 +68,7 @@ BEGIN
DATE(t.shipped),
-LEAST(s.quantity,0) `in`,
GREATEST(s.quantity,0) `out`,
t.warehouseFk,
w.name,
s.price * (100 - s.discount) / 100
FROM sale s
JOIN item i ON i.id = s.itemFk
@ -76,6 +76,7 @@ BEGIN
JOIN ticket t ON t.id = s.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
JOIN warehouse w ON w.id = t.warehouseFk
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable
@ -110,7 +111,7 @@ BEGIN
DATE(t.shipped),
-LEAST(tp.quantity,0) `in`,
GREATEST(tp.quantity,0) `out`,
t.warehouseFk,
w.name,
0
FROM ticketPackaging tp
JOIN packaging p ON p.id = tp.packagingFk
@ -118,6 +119,7 @@ BEGIN
JOIN ticket t ON t.id = tp.ticketFk
JOIN client c ON c.id = t.clientFk
JOIN supplier su ON su.nif = c.fi
JOIN warehouse w ON w.id = t.warehouseFk
WHERE su.id = vSupplierFk
AND t.shipped >= vFromDated
AND p.isPackageReturnable