From e7740033cad4bfbe0ca35ca05795635b2db4257e Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Wed, 8 May 2024 09:55:55 +0530 Subject: [PATCH] chore: remove validation on payment entry --- .../doctype/payment_entry/payment_entry.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 4e05afa6be9..f1779d52439 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -242,22 +242,6 @@ class PaymentEntry(AccountsController): 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",