Merge pull request #30858 from rmehta/fix-account-dim-patch-again

fix(minor): accounting dimension patch
This commit is contained in:
Rushabh Mehta 2022-05-02 09:42:28 +05:30 committed by GitHub
commit 04d56fbb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ def execute():
data = frappe.db.sql(
'select value from tabSingles where doctype="Accounts Settings" and field="enable_discount_accounting"'
)
discount_account = data and data[0][0] or 0
discount_account = data and int(data[0][0]) or 0
if discount_account:
for doctype in ["Buying Settings", "Selling Settings"]:
frappe.db.set_value(doctype, doctype, "enable_discount_accounting", 1, update_modified=False)