Minor fix in Journal Voucher

This commit is contained in:
Anand Doshi 2014-06-18 20:55:18 +05:30
parent c5e813f9f4
commit c20de7b264

View File

@ -186,9 +186,14 @@ class JournalVoucher(AccountsController):
def set_print_format_fields(self):
for d in self.get('entries'):
account_type, master_type = frappe.db.get_value("Account", d.account,
result = frappe.db.get_value("Account", d.account,
["account_type", "master_type"])
if not result:
continue
account_type, master_type = result
if master_type in ['Supplier', 'Customer']:
if not self.pay_to_recd_from:
self.pay_to_recd_from = frappe.db.get_value(master_type,