From 7c5124140e941a32aec5aad6660d7d09d78d4d0d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 6 Aug 2015 12:57:18 +0530 Subject: [PATCH] [fix] Party / Account Validation message against Invoice --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index f0630ce91c..80d243580d 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -192,8 +192,9 @@ class JournalEntry(AccountsController): if against_field in ["against_invoice", "against_voucher"]: if (against_voucher[0] !=d.party or against_voucher[1] != d.account): - frappe.throw(_("Row {0}: Party / Account does not match with \ - Customer / Debit To in {1}").format(d.idx, doctype)) + frappe.throw(_("Row {0}: Party / Account does not match with {1} / {2} in {3} {4}") + .format(d.idx, field_dict.get(doctype)[0], field_dict.get(doctype)[1], + doctype, d.get(against_field))) else: payment_against_voucher.setdefault(d.get(against_field), []).append(flt(d.get(dr_or_cr)))