Skip to content

Commit

Permalink
fix: inflated total amt in TDS report using back calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Oct 15, 2023
1 parent 9406ddb commit 78e22af
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ def get_result(
tax_amount += entry.credit - entry.debit

if net_total_map.get(name):
total_amount, grand_total, base_total = net_total_map.get(name)
if voucher_type == "Journal Entry":
# back calcalute total amount from rate and tax_amount
total_amount = grand_total = base_total = tax_amount / (rate / 100)
else:
total_amount, grand_total, base_total = net_total_map.get(name)
else:
total_amount += entry.credit

Expand Down

0 comments on commit 78e22af

Please sign in to comment.