Manage exchange rates
A Currency Exchange record stores an approved rate for one direction, from one date. ERPNext uses stored records before it asks the online provider. Store rates when a contract fixes the rate, when you need a known historical rate, or when the provider does not cover a currency.
How ERPNext chooses a rate
For a document's currency direction, date, and buying or selling side, ERPNext:
- takes the latest Currency Exchange record for that direction on or before the document date, with For Buying or For Selling matching;
- if Allow Stale Exchange Rates is off in Accounts Settings, ignores records older than Stale Days;
- if no record qualifies, asks the provider in Currency Exchange Settings, unless it is disabled;
- if there is still no rate, asks the user to enter one.
| Setting | Effect |
|---|---|
| Allow Stale Exchange Rates on (default) | The latest stored record is used, however old. Good for contract rates that stay valid until replaced. |
| Allow Stale Exchange Rates off | Only records within Stale Days count. Otherwise ERPNext fetches a fresh rate from the provider. |
The direction matters: a EUR to USD record does not answer a USD to EUR request. Create the reverse record when you need it.
Prerequisites
- Both currencies are enabled.
Create a rate
- Open the Currency Exchange list and select Add Currency Exchange.
- Enter the Date from which the rate applies.
- Select the From Currency and To Currency.
- Enter the Exchange Rate: the number of To Currency units for one From Currency unit. For 1 EUR = 1.15 USD, enter 1.15 with EUR as From Currency.
- Keep For Buying and For Selling selected, or clear one if buying and selling rates differ.
- Save.
When a new rate becomes valid, create a new record with the new date. Do not overwrite the old record: it explains older documents. Submitted documents keep their own rate. To restate open balances at a closing date, use Exchange Rate Revaluation.
To import many rates, use Data Import.
Use a fixed rate for a period
ERPNext has no "freeze rate" switch. To keep one approved rate:
- Create the record with the approved rate.
- Keep Allow Stale Exchange Rates on, so the record stays valid until you add a newer one.
- Give write permission on Currency Exchange only to the finance users who approve rates.
For daily market rates, turn Allow Stale Exchange Rates off, set a small Stale Days, and let the provider supply rates.
Enter a rate on a document
- Keep the document in draft.
- Check the currency and the currencies of the party, bank, or cash accounts.
- Read the direction in the label of the Exchange Rate field.
- Enter the approved rate.
- Compare the transaction and company-currency totals, then save.
The Price List Exchange Rate is a different field. It converts Item prices from the price list currency.
Why the exchange rate field is read-only
| Cause | What to do |
|---|---|
| The document is submitted | Cancel and amend it if your policy and links allow it. Check payments and returns first. |
| No conversion is needed | The company, document, and account currencies are the same. |
| The accounts set the currencies | On a Payment Entry, the accounts decide the currencies and the rate fields. |
| You lack permission | Check the role permissions. |
| A customization | Test with a standard role and check client scripts. |
Troubleshooting
ERPNext cannot find an exchange rate
Check that both currencies are enabled, the direction and date match, and For Buying or For Selling matches. Then check the stale-rate settings and whether the provider covers the currency.
ERPNext uses an old stored rate instead of the market rate
A stored record wins over the provider. Add a newer record, or turn off Allow Stale Exchange Rates.
A new rate does not change a draft
Select the currency or date again to fetch the rate, and check the saved value.