mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #9772 from tundebabzy/issue-9595
Wrong Exchange Rate when making payment against Journal Entry (#9595)
This commit is contained in:
@@ -492,9 +492,13 @@ def get_outstanding_reference_documents(args):
|
|||||||
|
|
||||||
for d in outstanding_invoices:
|
for d in outstanding_invoices:
|
||||||
d["exchange_rate"] = 1
|
d["exchange_rate"] = 1
|
||||||
if party_account_currency != company_currency \
|
if party_account_currency != company_currency:
|
||||||
and d.voucher_type in ("Sales Invoice", "Purchase Invoice"):
|
if d.voucher_type in ("Sales Invoice", "Purchase Invoice"):
|
||||||
d["exchange_rate"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "conversion_rate")
|
d["exchange_rate"] = frappe.db.get_value(d.voucher_type, d.voucher_no, "conversion_rate")
|
||||||
|
elif d.voucher_type == "Journal Entry":
|
||||||
|
d["exchange_rate"] = get_exchange_rate(
|
||||||
|
party_account_currency, company_currency, d.posting_date
|
||||||
|
)
|
||||||
|
|
||||||
# Get all SO / PO which are not fully billed or aginst which full advance not paid
|
# Get all SO / PO which are not fully billed or aginst which full advance not paid
|
||||||
orders_to_be_billed = get_orders_to_be_billed(args.get("posting_date"),args.get("party_type"), args.get("party"),
|
orders_to_be_billed = get_orders_to_be_billed(args.get("posting_date"),args.get("party_type"), args.get("party"),
|
||||||
|
|||||||
Reference in New Issue
Block a user