fix: error message when making reverse journal entry (#24665)
This commit is contained in:
parent
311bb6452f
commit
fdafb55fba
@ -229,11 +229,11 @@ class JournalEntry(AccountsController):
|
|||||||
if d.reference_type=="Journal Entry":
|
if d.reference_type=="Journal Entry":
|
||||||
account_root_type = frappe.db.get_value("Account", d.account, "root_type")
|
account_root_type = frappe.db.get_value("Account", d.account, "root_type")
|
||||||
if account_root_type == "Asset" and flt(d.debit) > 0:
|
if account_root_type == "Asset" and flt(d.debit) > 0:
|
||||||
frappe.throw(_("For {0}, only credit accounts can be linked against another debit entry")
|
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets credited")
|
||||||
.format(d.account))
|
.format(d.idx, d.account))
|
||||||
elif account_root_type == "Liability" and flt(d.credit) > 0:
|
elif account_root_type == "Liability" and flt(d.credit) > 0:
|
||||||
frappe.throw(_("For {0}, only debit accounts can be linked against another credit entry")
|
frappe.throw(_("Row #{0}: For {1}, you can select reference document only if account gets debited")
|
||||||
.format(d.account))
|
.format(d.idx, d.account))
|
||||||
|
|
||||||
if d.reference_name == self.name:
|
if d.reference_name == self.name:
|
||||||
frappe.throw(_("You can not enter current voucher in 'Against Journal Entry' column"))
|
frappe.throw(_("You can not enter current voucher in 'Against Journal Entry' column"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user