chore: resolve conflicts

This commit is contained in:
ljain112
2026-06-09 18:04:14 +05:30
parent 9fda953a88
commit 42a3961fd9
2 changed files with 3 additions and 14 deletions

View File

@@ -32,17 +32,11 @@ from erpnext.utilities.regional import temporary_flag
class calculate_taxes_and_totals:
def __init__(self, doc: Document):
self.doc = doc
<<<<<<< HEAD
frappe.flags.round_off_applicable_accounts = []
=======
frappe.flags.round_off_applicable_accounts = (
get_round_off_applicable_accounts(self.doc.company, [], self.doc) or []
)
>>>>>>> 08129ff71c (fix: update round off account functions to accept document context for regional overrides (#55758))
frappe.flags.round_row_wise_tax = frappe.get_single_value("Accounts Settings", "round_row_wise_tax")
self._items = self.filter_rows() if self.doc.doctype == "Quotation" else self.doc.get("items")
get_round_off_applicable_accounts(self.doc.company, frappe.flags.round_off_applicable_accounts)
get_round_off_applicable_accounts(self.doc.company, [], self.doc)
self.calculate()
def filter_rows(self):
@@ -1246,13 +1240,9 @@ def get_itemised_tax_breakup_html(doc):
@frappe.whitelist()
<<<<<<< HEAD
def get_round_off_applicable_accounts(company, account_list):
=======
def get_round_off_applicable_accounts(
company: str, account_list: list | str, doc: str | dict | Document | None = None
):
>>>>>>> 08129ff71c (fix: update round off account functions to accept document context for regional overrides (#55758))
# required to set correct region
with temporary_flag("company", company):
return get_regional_round_off_accounts(company, account_list, doc)

View File

@@ -1,3 +1,5 @@
from unittest.mock import patch
import frappe
from erpnext.controllers.taxes_and_totals import calculate_taxes_and_totals
@@ -6,8 +8,6 @@ from erpnext.tests.utils import ERPNextTestSuite
class TestTaxesAndTotals(ERPNextTestSuite):
<<<<<<< HEAD
=======
def test_regional_round_off_accounts(self):
"""
Regional overrides cannot extend the list in-place — the return
@@ -30,7 +30,6 @@ class TestTaxesAndTotals(ERPNextTestSuite):
self.assertIn(test_account, frappe.flags.round_off_applicable_accounts)
>>>>>>> 08129ff71c (fix: update round off account functions to accept document context for regional overrides (#55758))
def test_disabling_rounded_total_resets_base_fields(self):
"""Disabling rounded total should also clear base rounded values."""
so = make_sales_order(do_not_save=True)