X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FPart.pm;h=db3a26663a7d9cce8897d113ad8ccaa71f32c180;hb=bf8139f8a70fbac9f270020a99e692c439d4348b;hp=9eb76df6ac2a497b84d92642aece0d4bd07d4294;hpb=20004cac8f656f67e86e63fdb85f6dc083cf83d7;p=kivitendo-erp.git diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 9eb76df6a..db3a26663 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -373,7 +373,7 @@ sub get_simple_stock_sql { LEFT JOIN warehouse w ON (i.warehouse_id = w.id) LEFT JOIN bin b ON (i.bin_id = b.id) WHERE parts_id = ? - GROUP BY w.description, b.description, p.unit, i.parts_id + GROUP BY w.description, w.sortkey, b.description, p.unit, i.parts_id HAVING SUM(qty) != 0 WINDOW pt AS (PARTITION BY i.parts_id ORDER BY w.sortkey, b.description, p.unit), wh AS (PARTITION by w.description ORDER BY w.sortkey, b.description, p.unit)