mirror of
https://github.com/grocy/grocy.git
synced 2026-03-27 23:29:25 +01:00
Keep the newest instead of the oldest on campacting stock entries
This commit is contained in:
parent
cf8604e984
commit
4aee175105
|
|
@ -9,7 +9,7 @@ SELECT
|
||||||
product_id,
|
product_id,
|
||||||
SUM(amount) AS total_amount,
|
SUM(amount) AS total_amount,
|
||||||
MIN(stock_id) AS stock_id_to_keep,
|
MIN(stock_id) AS stock_id_to_keep,
|
||||||
MIN(id) AS id_to_keep,
|
MAX(id) AS id_to_keep,
|
||||||
GROUP_CONCAT(id) AS id_group,
|
GROUP_CONCAT(id) AS id_group,
|
||||||
GROUP_CONCAT(stock_id) AS stock_id_group,
|
GROUP_CONCAT(stock_id) AS stock_id_group,
|
||||||
id -- Dummy
|
id -- Dummy
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user