Minor fix in Journal Voucher
This commit is contained in:
parent
c5e813f9f4
commit
c20de7b264
@ -186,9 +186,14 @@ class JournalVoucher(AccountsController):
|
|||||||
|
|
||||||
def set_print_format_fields(self):
|
def set_print_format_fields(self):
|
||||||
for d in self.get('entries'):
|
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"])
|
["account_type", "master_type"])
|
||||||
|
|
||||||
|
if not result:
|
||||||
|
continue
|
||||||
|
|
||||||
|
account_type, master_type = result
|
||||||
|
|
||||||
if master_type in ['Supplier', 'Customer']:
|
if master_type in ['Supplier', 'Customer']:
|
||||||
if not self.pay_to_recd_from:
|
if not self.pay_to_recd_from:
|
||||||
self.pay_to_recd_from = frappe.db.get_value(master_type,
|
self.pay_to_recd_from = frappe.db.get_value(master_type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user