Skip to content

Commit

Permalink
fix: add total col for gross and net profit
Browse files Browse the repository at this point in the history
(cherry picked from commit cb9b4fb)
  • Loading branch information
akurungadam authored and mergify[bot] committed Jun 19, 2023
1 parent a53832e commit e899c30
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ def get_profit(

if profit_loss[key]:
has_value = True
if not profit_loss.get("total"):
profit_loss["total"] = 0
profit_loss["total"] += profit_loss[key]

if has_value:
return profit_loss
Expand Down Expand Up @@ -234,6 +237,9 @@ def get_net_profit(

if profit_loss[key]:
has_value = True
if not profit_loss.get("total"):
profit_loss["total"] = 0
profit_loss["total"] += profit_loss[key]

if has_value:
return profit_loss

0 comments on commit e899c30

Please sign in to comment.