fix: Revert Changes

This commit is contained in:
Deepesh Garg
2021-06-26 23:49:32 +05:30
parent 0dfea4d134
commit 2908f2ee20
3 changed files with 81 additions and 32 deletions

View File

@@ -202,16 +202,15 @@ def get_or_create_account(company_name, account):
existing_accounts = frappe.get_list('Account',
filters={
'account_name': account.get('account_name'),
'account_number': account.get('account_number', ''),
'company': company_name
'company': company_name,
'root_type': root_type
},
or_filters={
'company': company_name,
'root_type': root_type,
'is_group': 0
}
)
'account_name': account.get('account_name'),
'account_number': account.get('account_number')
})
print(company_name, account, existing_accounts)
if existing_accounts:
return frappe.get_doc('Account', existing_accounts[0].name)