diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 8820c87b40f..3f34020d122 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -88,9 +88,7 @@ class PurchaseInvoice(BuyingController): throw(_("Conversion rate cannot be 0 or 1")) def validate_credit_to_acc(self): - root_type, account_type = frappe.db.get_value("Account", self.credit_to, ["root_type", "account_type"]) - if root_type != "Liability": - frappe.throw(_("Credit To account must be a liability account")) + account_type = frappe.db.get_value("Account", self.credit_to, "account_type") if account_type != "Payable": frappe.throw(_("Credit To account must be a Payable account")) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index fe5954e0e07..abe58cea85d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -235,9 +235,7 @@ class SalesInvoice(SellingController): reconcile_against_document(lst) def validate_debit_to_acc(self): - root_type, account_type = frappe.db.get_value("Account", self.debit_to, ["root_type", "account_type"]) - if root_type != "Asset": - frappe.throw(_("Debit To account must be a liability account")) + account_type = frappe.db.get_value("Account", self.debit_to, "account_type") if account_type != "Receivable": frappe.throw(_("Debit To account must be a Receivable account")) diff --git a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py index 2f855135583..14426f5e809 100644 --- a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py +++ b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py @@ -7,6 +7,6 @@ def execute(): account_settings = frappe.get_doc("Accounts Settings") if not account_settings.frozen_accounts_modifier and account_settings.bde_auth_role: - frappe.db.set_value("Account Settings", None, + frappe.db.set_value("Accounts Settings", None, "frozen_accounts_modifier", account_settings.bde_auth_role)