From 3a1f5109d9cb6908f5d2496f44f56f4c21ed696b Mon Sep 17 00:00:00 2001 From: pako Date: Mon, 1 Apr 2024 11:58:16 +0200 Subject: [PATCH] lines and volume --- db/routines/vn/procedures/collection_new.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 82196585d..1292707af 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -219,9 +219,11 @@ proc:BEGIN UPDATE tmp.productionBuffer pb JOIN ( SELECT SUM(litros) liters, - @lines:= COUNT(*) + @lines `lines`, + @lines:= COUNT(*) + @lines, + COUNT(*) `lines`, MAX(i.`size`) height, - @volume := SUM(sv.volume) + @volume volume + @volume := SUM(sv.volume) + @volume, + SUM(sv.volume) volume FROM saleVolume sv JOIN sale s ON s.id = sv.saleFk JOIN item i ON i.id = s.itemFk