fix: added a flag on journal entry to ignore party account type validation if required

(cherry picked from commit 0665d13fd3)
This commit is contained in:
Asmita Hase
2025-08-07 17:31:36 +05:30
committed by Mergify
parent 96e467670a
commit 8a3fdb4ec2

View File

@@ -552,6 +552,7 @@ class JournalEntry(AccountsController):
elif (
d.party_type
and frappe.db.get_value("Party Type", d.party_type, "account_type") != account_type
and (not self.flags.ignore_party_account_validation)
):
frappe.throw(
_("Row {0}: Account {1} and Party Type {2} have different account types").format(