diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 9f2190560c5..56f462a8d6b 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1072,8 +1072,8 @@ class AccountsController(TransactionBase): for method_name in frappe.get_hooks("voucher_subtypes"): voucher_subtype = frappe.get_attr(method_name)(self) - if voucher_subtype: - return voucher_subtype + if voucher_subtype: + return voucher_subtype if self.doctype in voucher_subtypes: return self.get(voucher_subtypes[self.doctype])