Small corrections.

This commit is contained in:
2020-05-30 18:37:58 +02:00
parent 4c4ffa048f
commit 51f220e5d2
7 changed files with 32 additions and 15 deletions

View File

@@ -221,8 +221,8 @@ AS SELECT iat.IdIngrediente IdIngrediente,
- COALESCE(iiu.InUso, 0)) QuantitàDisponibile
FROM IngredientiAcquistatiTotali iat
LEFT JOIN IngredientiUsati iu
ON iu.idIngrediente = iat.IdIngrediente
ON iu.IdIngrediente = iat.IdIngrediente
LEFT JOIN IngredientiInUso iiu
ON iiu.idIngrediente = iat.IdIngrediente
ON iiu.IdIngrediente = iat.IdIngrediente
WHERE iat.Totale - COALESCE(iu.Usati, 0) > 0;
COMMIT;

View File

@@ -185,8 +185,8 @@ AS SELECT iat.IdIngrediente IdIngrediente,
- COALESCE(iiu.InUso, 0)) QuantitàDisponibile
FROM IngredientiAcquistatiTotali iat
LEFT JOIN IngredientiUsati iu
ON iu.idIngrediente = iat.IdIngrediente
ON iu.IdIngrediente = iat.IdIngrediente
LEFT JOIN IngredientiInUso iiu
ON iiu.idIngrediente = iat.IdIngrediente
ON iiu.IdIngrediente = iat.IdIngrediente
WHERE iat.Totale - COALESCE(iu.Usati, 0) > 0;
COMMIT;