7658-devToTest_2428 #2663

Merged
alexm merged 251 commits from 7658-devToTest_2428 into test 2024-07-02 07:20:13 +00:00
1 changed files with 4 additions and 2 deletions
Showing only changes of commit 49e01218e9 - Show all commits

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