diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 9c6ae5afa98..59dd337d3af 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1127,13 +1127,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe currency() { // The transaction date be either transaction_date (from orders) or posting_date (from invoices) let transaction_date = this.frm.doc.transaction_date || this.frm.doc.posting_date; + let inter_company_reference = this.frm.doc.inter_company_order_reference || this.frm.doc.inter_company_invoice_reference; let me = this; this.set_dynamic_labels(); let company_currency = this.get_company_currency(); // Added `load_after_mapping` to determine if document is loading after mapping from another doc if(this.frm.doc.currency && this.frm.doc.currency !== company_currency - && !this.frm.doc.__onload?.load_after_mapping) { + && (!this.frm.doc.__onload?.load_after_mapping || inter_company_reference)) { this.get_exchange_rate(transaction_date, this.frm.doc.currency, company_currency, function(exchange_rate) {