fix: dependent codes updated
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index e6a46d0..a222dd9 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -669,7 +669,7 @@
exchange_rate_map, net_rate_map = get_purchase_document_details(self)
enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Buying Settings", "enable_discount_accounting")
)
provisional_accounting_for_non_stock_items = cint(
frappe.db.get_value(
@@ -1157,7 +1157,7 @@
# tax table gl entries
valuation_tax = {}
enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Buying Settings", "enable_discount_accounting")
)
for tax in self.get("taxes"):
@@ -1250,7 +1250,7 @@
def enable_discount_accounting(self):
if not hasattr(self, "_enable_discount_accounting"):
self._enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Buying Settings", "enable_discount_accounting")
)
return self._enable_discount_accounting
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 1efd3dc..dd85d99 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -1051,7 +1051,7 @@
def make_tax_gl_entries(self, gl_entries):
enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
)
for tax in self.get("taxes"):
@@ -1097,7 +1097,7 @@
def make_item_gl_entries(self, gl_entries):
# income account gl entries
enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
)
for item in self.get("items"):
@@ -1276,7 +1276,7 @@
def enable_discount_accounting(self):
if not hasattr(self, "_enable_discount_accounting"):
self._enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
)
return self._enable_discount_accounting
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 7cbd2bd..5ebbb7a 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -1080,7 +1080,7 @@
def make_discount_gl_entries(self, gl_entries):
enable_discount_accounting = cint(
- frappe.db.get_single_value("Accounts Settings", "enable_discount_accounting")
+ frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
)
if enable_discount_accounting: