fix: get company from ref doc as it's not available in payment request

This commit is contained in:
Smit Vora
2024-10-07 22:55:58 +05:30
parent f6b91969b2
commit 078eb46eb8

View File

@@ -101,9 +101,10 @@ class PaymentRequest(Document):
)
def before_submit(self):
company = frappe.get_value(self.reference_doctype, self.reference_name, "company")
if (
self.currency != self.party_account_currency
and self.party_account_currency == get_company_currency(self.company)
and self.party_account_currency == get_company_currency(company)
):
# set outstanding amount in party account currency
invoice = frappe.get_value(