mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge pull request #45093 from frappe/mergify/bp/version-15-hotfix/pr-45051
fix: ignore currency validation while canceling the voucher (backport #45051)
This commit is contained in:
@@ -275,6 +275,9 @@ class GLEntry(Document):
|
|||||||
validate_account_party_type(self)
|
validate_account_party_type(self)
|
||||||
|
|
||||||
def validate_currency(self):
|
def validate_currency(self):
|
||||||
|
if self.is_cancelled:
|
||||||
|
return
|
||||||
|
|
||||||
company_currency = erpnext.get_company_currency(self.company)
|
company_currency = erpnext.get_company_currency(self.company)
|
||||||
account_currency = get_account_currency(self.account)
|
account_currency = get_account_currency(self.account)
|
||||||
|
|
||||||
|
|||||||
@@ -760,6 +760,9 @@ def validate_party_frozen_disabled(party_type, party_name):
|
|||||||
|
|
||||||
|
|
||||||
def validate_account_party_type(self):
|
def validate_account_party_type(self):
|
||||||
|
if self.is_cancelled:
|
||||||
|
return
|
||||||
|
|
||||||
if self.party_type and self.party:
|
if self.party_type and self.party:
|
||||||
account_type = frappe.get_cached_value("Account", self.account, "account_type")
|
account_type = frappe.get_cached_value("Account", self.account, "account_type")
|
||||||
if account_type and (account_type not in ["Receivable", "Payable"]):
|
if account_type and (account_type not in ["Receivable", "Payable"]):
|
||||||
|
|||||||
Reference in New Issue
Block a user