From f6bb86574e4cd3b113b5e4b976f319f68847ad72 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Tue, 24 Jun 2025 16:45:41 +0530 Subject: [PATCH] chore: fix test case for auto tax appending --- .../selling/doctype/sales_order/test_sales_order.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index edac4f70f19..ae807e5b1c0 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -177,6 +177,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): so.load_from_db() self.assertEqual(so.per_billed, 0) + @change_settings( + "Accounts Settings", + {"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 1}, + ) def test_make_sales_invoice_with_terms(self): so = make_sales_order(do_not_submit=True) @@ -1828,6 +1832,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): self.assertEqual(so.items[0].work_order_qty, wo.produced_qty) self.assertEqual(mr.status, "Manufactured") + @change_settings( + "Accounts Settings", + {"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 0}, + ) def test_sales_order_with_shipping_rule(self): from erpnext.accounts.doctype.shipping_rule.test_shipping_rule import create_shipping_rule @@ -1853,6 +1861,10 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase): sales_order.save() self.assertEqual(sales_order.taxes[0].tax_amount, 0) + @change_settings( + "Accounts Settings", + {"add_taxes_from_item_tax_template": 0, "add_taxes_from_taxes_and_charges_template": 1}, + ) def test_sales_order_partial_advance_payment(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_entry,