Skip to content

Commit

Permalink
fix: set rate when list not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninad1306 committed Aug 21, 2024
1 parent 48572d2 commit 13e77a2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def set_taxes(doc):
.orderby(sales_tax_template.modified, order=Order.desc)
.limit(1)
.run(pluck=True)
)[0] or 0
)
rate = rate[0] if rate else 0

tax_types = ("igst",)
if not is_inter_state_supply(doc):
Expand Down

0 comments on commit 13e77a2

Please sign in to comment.