diff --git a/src/worker/events.rs b/src/worker/events.rs index e49bd42..296e688 100644 --- a/src/worker/events.rs +++ b/src/worker/events.rs @@ -1319,10 +1319,15 @@ impl EventsWorker { ) .unwrap_or(absolute_change); + // `absolute` ist negativ (Abgang). `loss` positiv — für UI-Texte wie „Verlust: {loss}“ + // (ohne `Math.abs` auf `absolute`). + let loss_display = (-applied_change).max(0.0); + return Ok(Some(json!({ "type": "money_change", "percent": percent_change, - "absolute": applied_change + "absolute": applied_change, + "loss": loss_display }))); }