mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 08:11:19 +00:00
fix: get company from ref doc as it's not available in payment request
This commit is contained in:
@@ -101,9 +101,10 @@ class PaymentRequest(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def before_submit(self):
|
def before_submit(self):
|
||||||
|
company = frappe.get_value(self.reference_doctype, self.reference_name, "company")
|
||||||
if (
|
if (
|
||||||
self.currency != self.party_account_currency
|
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
|
# set outstanding amount in party account currency
|
||||||
invoice = frappe.get_value(
|
invoice = frappe.get_value(
|
||||||
|
|||||||
Reference in New Issue
Block a user