Skip to content

Commit

Permalink
chore: remove validation on payment entry
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Jun 10, 2024
1 parent d3bdd41 commit e774003
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,6 @@ def set_liability_account(self):
alert=True,
)

def validate_advance_account_currency(self):
if self.book_advance_payments_in_separate_party_account is True:
company_currency = frappe.get_cached_value("Company", self.company, "default_currency")
if self.payment_type == "Receive" and self.paid_from_account_currency != company_currency:
frappe.throw(
_("Booking advances in foreign currency account: {0} ({1}) is not yet supported.").format(
frappe.bold(self.paid_from), frappe.bold(self.paid_from_account_currency)
)
)
if self.payment_type == "Pay" and self.paid_to_account_currency != company_currency:
frappe.throw(
_("Booking advances in foreign currency account: {0} ({1}) is not yet supported.").format(
frappe.bold(self.paid_to), frappe.bold(self.paid_to_account_currency)
)
)

def on_cancel(self):
self.ignore_linked_doctypes = (
"GL Entry",
Expand Down

0 comments on commit e774003

Please sign in to comment.