You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kemi: stock history is ordered by date but balances follow entry order #1461
The stock history rows (W2 Lagerhistorik and the W6 stock lines) are ordered by At, but balanceAfter is computed in entry Id order. A backdated entry therefore shows a balance that does not follow from the row below it. The web cannot backdate (at: null in the stock dialog), only an offline mobile outbox can, so it is rare.
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/ChemicalReporting/ChemicalHistoryService.cs:346-347 (order by At, then Action, PlacementId, Seq) against ChemicalInventoryService.BalanceAfterByEntry used at ChemicalHistoryService.cs:134
Suggested fix
Decide the intended order. Either show the balance in the same order as the rows (fold by At), or add a visible cue that a balance follows entry order. Add a test with a backdated entry.
Origin
Plan E final review m-6 (and the parked T13 item), PR #1437 (merged as a81a41b).
Activity