diff --git a/scripts/views.py b/scripts/views.py index 05e5055..c63f67e 100644 --- a/scripts/views.py +++ b/scripts/views.py @@ -310,8 +310,9 @@ def build_juniors_view_model( cell_text = "-" amount_to_pay = 0 - if expected == "?" or (isinstance(expected, int) and expected > 0): - if expected == "?": + is_unknown = original_expected == "?" + if is_unknown or (isinstance(expected, int) and expected > 0): + if is_unknown: status = "empty" cell_text = f"?{count_str}" elif paid >= expected: @@ -339,7 +340,7 @@ def build_juniors_view_model( status = "surplus" cell_text = f"PAID {paid}" - if (isinstance(expected, int) and expected > 0) or paid > 0: + if (not is_unknown and isinstance(expected, int) and expected > 0) or paid > 0: tooltip = f"Received: {paid}, Expected: {expected}" else: tooltip = ""