fix(patch): enable discount account in buying and selling if exist in accounts settings
diff --git a/erpnext/patches/v14_0/discount_accounting_separation.py b/erpnext/patches/v14_0/discount_accounting_separation.py
new file mode 100644
index 0000000..bb236f7
--- /dev/null
+++ b/erpnext/patches/v14_0/discount_accounting_separation.py
@@ -0,0 +1,14 @@
+import frappe
+
+def execute():
+    doc = frappe.get_doc("Accounts Settings")
+    discount_account = doc.enable_discount_accounting
+    if discount_account:
+        buying_settings = frappe.get_doc("Buying Settings")
+        selling_settings = frappe.get_doc("Selling Settings")
+
+        buying_settings.enable_discount_accounting = 1
+        selling_settings.enable_discount_accounting = 1
+
+        buying_settings.save()
+        selling_settings.save()
\ No newline at end of file