fix: add total col for gross and net profit

This commit is contained in:
Anoop Kurungadam
2023-05-10 12:34:15 +05:30
parent 1a3b9c5bdf
commit cb9b4fbb91

View File

@@ -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
@@ -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