Skip to content

Commit

Permalink
refactor: use correct method parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Dec 31, 2024
1 parent bcd3b36 commit fd2a1a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2819,8 +2819,8 @@ def test_item_tax_net_range(self):

sales_invoice = create_sales_invoice(item="T Shirt", rate=700, do_not_submit=True)
item_tax_map = get_item_tax_map(
doc=sales_invoice,
tax_template=sales_invoice.items[0].item_tax_template,
company=sales_invoice.company,
item_tax_template=sales_invoice.items[0].item_tax_template,
)

self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 12 - _TC")
Expand All @@ -2832,8 +2832,8 @@ def test_item_tax_net_range(self):
sales_invoice.save()

item_tax_map = get_item_tax_map(
doc=sales_invoice,
tax_template=sales_invoice.items[0].item_tax_template,
company=sales_invoice.company,
item_tax_template=sales_invoice.items[0].item_tax_template,
)

self.assertEqual(sales_invoice.items[0].item_tax_template, "_Test Account Excise Duty @ 10 - _TC")
Expand Down
4 changes: 2 additions & 2 deletions erpnext/controllers/taxes_and_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def validate_item_tax_template(self):
def update_item_tax_map(self):
for item in self.doc.items:
item.item_tax_rate = get_item_tax_map(
doc=self.doc,
tax_template=item.item_tax_template,
company=self.doc.get("company"),
item_tax_template=item.item_tax_template,
as_json=True,
)

Expand Down

0 comments on commit fd2a1a0

Please sign in to comment.