fix(flows): udkørselsregler vises kun når en vare bruger dem

Rent lager-flow viste 'sælg fra 90 %' / 'pris >= 90 %' selv om det aldrig
sælger. Guidens Regler-trin, resuméet og statuslinjen viser nu kun
salgsgrænser ved salg og lagergrænsen ved lager (v1.60.11.0).
This commit is contained in:
2026-09-29 21:02:10 +02:00
parent 089fb98782
commit 76f51c7be7
8 changed files with 73 additions and 12 deletions
@@ -49,7 +49,11 @@ function SmartPickupFrame:flowCells(adEnv, run)
end
local rule
if row.kind == "outbound" then
rule = string.format(i18n:getText("spu_flow_ruleOut"), row.sellAtPercent or 90, row.storeAbovePercent or 80)
local sells, stores = ADFlowView.policyUse(row.policies)
local parts = {}
if sells then table.insert(parts, string.format(i18n:getText("spu_flow_ruleSell"), row.sellAtPercent or 90)) end
if stores then table.insert(parts, string.format(i18n:getText("spu_flow_ruleStore"), row.storeAbovePercent or 80)) end
rule = table.concat(parts, ", ")
if row.collectRound then rule = rule .. ", " .. i18n:getText("spu_flow_round") end
else
rule = row.loops ~= nil and row.loops > 0 and string.format(i18n:getText("spu_flow_ruleInLoops"), row.loops) or i18n:getText("spu_flow_ruleIn")