Skip to content

Commit

Permalink
fix: show correct variance for durations with no vouchers
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Mar 18, 2024
1 parent 1a3ea0c commit bc78bc3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ def prepare_data(
):
details[p_key] += r.get(qty_or_amount_field, 0)
details[variance_key] = details.get(p_key) - details.get(target_key)
else:
details[variance_key] = details.get(p_key) - details.get(target_key)

details["total_achieved"] += details.get(p_key)
details["total_variance"] = details.get("total_achieved") - details.get("total_target")
Expand Down

0 comments on commit bc78bc3

Please sign in to comment.