fix: removed hard coded string

This commit is contained in:
Anurag Mishra
2019-08-13 19:47:20 +05:30
parent 582c86a7b6
commit 8d84ffb276

View File

@@ -254,7 +254,7 @@ class Company(NestedSet):
def set_mode_of_payment_account(self):
cash = frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name')
if cash and self.default_cash_account \
and not frappe.db.get_value('Mode of Payment Account', {'company': self.name}):
and not frappe.db.get_value('Mode of Payment Account', {'company': self.name, 'parent': cash}):
mode_of_payment = frappe.get_doc('Mode of Payment', cash)
mode_of_payment.append('accounts', {
'company': self.name,