Agio calculation
The system tracks agio as either unrealised or realised. Unrealised agio is calculated at period end for unpaid foreign currency items and remains on the balance sheet. Realised agio is recorded when payments are made, moving amounts from unrealised to realised and posting against the actual payment.
The behaviour of splitting agio into unrealised and realised is controlled by a system-level setting. Once activated, all foreign currency transactions follow this model, ensuring consistent accounting treatment of gains and losses.
The company setting is called First accounting period for unrealized currency payments in reversal and import model.

RamBase has two processes for calculation of agio, both are described below. The first process is done during period closure by the user. The second one is done automatically by RamBase when registering customer and supplier payments.
Agio calculation from the Period Account Register (PAR)
The calculation of the unrealized agio is performed in the Period Account Register (PAR). One of the procedures during period closure is to import the unrealized gain and losses to the general ledger.
When closing an accounting period, the closing period's opening balance must be reversed, and the current period's balance must be imported. The import job will automatically split the unrealized gains and losses.
Reverse the last periods inventory balances and import the current inventory balances
To open the Period Account Register (PAR) application, find Finance in the RamBase menu and then General ledger. Click Accounting periods to enter the PAR application.
Highlight the relevant period and press ENTER.
Select the Agio folder.

Right click and chose menu option Create reverse and import agio.
If everything is correct, the lines will now be marked with Status 4 with a reference to a general ledger entry. Agio status in the upper right corner will be Status 4.
Agio calculation in PAR will create 3 sets of documents:
CUSBAL - Agio on Account Receivable (AR).
SUPBAL - Agio on Account Payables (AP).
ACCBAL - Agio on all other GL accounts (Not AR & AP).
General ledger postings (ATR) documents for CUSBAL and SUPBAL will be calculated based on customer and supplier balances in foreign currencies. Each ATR item will have a reference to a Customer / Supplier Account and currency. The amount will be calculated based on:
For all transactions (CAT & SAT) that are open by the end of current period, but registered in earlier periods: Agio will be calculated using the transaction rate and the current period-end rate.
ATR document with transaction type ACCBAL will handle all other GL accounts (Not AR & AP) and agio will be calculated this way:
For all transactions (ATR items) that are registered in earlier periods: Agio will be calculated using the transaction rate and the current period-end rate.

Example
Your system currency is USD.
You have a CIN for 100 EUR.
The day the CIN was registered (St:4) the rate was 1,1.This means that the value of this CIN in your system currency is (100*1,1) = 110 USD.
The registration of the CIN generates an open post in the Accounts receivable ledger for 110 USD.
On the last day of the month the rate was 1,2 (Period rate).
By the end of the month the open post was agio calculated based on the period rate and the currency rate on the date of registration.(100*1,2) - (100*1,1) = 10This means an agio profit of 10 USD.
If the CIN is not paid by end of next month, the unrealized agio for the previous month will be reversed and the open post (CIN) will be agio calculated based on the new period rate and the currency rate on the date of registration.
The new period rate is 1,4.
(100*1,4) - (100*1,1) = 30. This means an agio profit of 30 USD.
When payment occurs, any unrealised agio is moved to realised agio. For example, if the invoice is paid at a rate of 1,5 EUR/USD, the difference between the transaction rate and payment rate is posted as realized agio on the payment.
Relevant report: FRP > ACCBAL > GL Account Balances, from AGIO calculations.
GL Posting
GL accounts set up in Account Defaults (ACD) for Unrealizedgains and Unrealizedlosses are used when agio is created during period closure in PAR. Used as an offset account.
ACD/UNREALIZEDGAINS and ACD/UNREALISEDLOSSES

Agio calculation on Payment (PAY)
For all invoices or credit notes linked to a payment, realized agio will be calculated using the exchange rate from the transaction date and the exchange rate from the payment date to determine the value in local currency. This applies to all invoices or credit notes regardless if they are registered in an earlier period or in the same period as the payment. The realized agio is presented in the field Currency Adjustment on the payment.
Currency deviations on payments
GL account for Currency Deviations on Payments.
Scenario Example:
Payment Currency: NOK (Norwegian Krone)
Invoice Currency: EUR (Euro)
In this example:
The sales invoice is for 1,250 EUR, registered on 2025.09.18 with an exchange rate (RATE) of 11.626.
The payment has a CURDATE of 2025.10.18, with a RATE of 11.7293.

Calculation of Currency Adjustment
The Currency adjustment field reflects the currency deviation, calculated as follows:
Determine the Payment Value in Local Currency (NOK): 1,250 EUR * 11.7293 (CURDATE RATE) = 14 661,63 NOK
Determine the Invoice Value in Local Currency (NOK) Based on RATE from invoice: 1,250 EUR * 11.626 (2025.09.18 RATE) = 14 532,50 NOK
Calculate the Currency Adjustment: 14 661,63 NOK – 14 532,50 NOK = 129,13 NOK
The resulting currency adjustment of 129,13 NOK reflects the gain (or loss) due to exchange rate fluctuations between the invoice registration and payment dates.
When payments are processed, unrealised agio from previous periods is automatically transitioned to realised agio and posted to the appropriate gain or loss account.
Inspecting the Currency Adjustment Field
The Currency Adjustment field includes an Inspect feature:
Clicking this allows you to view a detailed report of the currency loss or gain for the selected invoice and any credit notes linked to the payment.
This report helps trace and verify how the deviation was calculated.
GL Posting
This currency adjustment amount is automatically posted to the GL account configured in the Account Default (ACD) settings under Currency Deviation on Payments.
ACD/REALIZEDGAINS and ACD/REALISEDLOSSES - Currency deviations on payments.

Explanation to the «Deviation amount»
Differences due to different exchange rate in bank and RamBase. This is the difference between the value of the invoice based on RATE of the Currency date and what is received in bank. This deviation in «Deviation amount» could also contain of for example bank fees.
Example Calculation:
Invoice amount: 1 250 EUR
Exchange rate on Currency date: 11.7293
Invoice value in base currency: 1250 ×11.7293 = 14 661.63
Amount received in the bank: 14 531
Difference (Deviation Amount): 14 661.63−14 531=−130,63

The user must decide how to post this deviation to the General Ledger (GL). This process is performed manually. The accounting for the above payment will look like this:

ACD/EXCHANGE - Currency exchange
GL account used when payments in foreign currency is posted to General Ledger:
When payment and invoices/credit notes have different currencies, additional posting is made to balance out the GL postings.
When a payment has many invoices and credits with different exchange rates, GL postings may not balance because of round offs on calculated average exchange rates. Additional posting for exchange rate difference is then made, if this difference is less than given in CompanySetting "MaxPaymentCurrencyDeviationOnLedgerSpecification".
Example Impact on GL Account
Scenario: Currency Deviations on Payments
Calculate the invoice value from USD to the base currency (NOK):
Based on the last day of the previous month: 6,600 USD×10.9139=72 031.74 NOK
Based on Currency date: 6,600 USD×10.6225=70 108.50 NOK, Difference: 72,031.74−70,108.50=1 923.24 NOK
Convert the NOK difference to EUR (PAY is for a Euro bank account): 1,923.24 NOK÷11.4258=168.32
Postings to «ACC/8060»:
When the amounts in USD and EUR are exchanged to NOK, two EUR postings are created because of the currency posting.
Typically, only minor round-offs are posted to this account due to rounding of exchange rates and two-decimal resolution in GL.



The effect on ACC/8060 for this payment will be:

ACD/VATRATEADJ - Vat rate adjustment on Invoices and Credit Notes
This GL account is used when VAT adjustments are needed due to differences between the VAT rate and the exchange rate on invoices or credit notes.
Example Scenario:
An inbound invoice (SIN) has a VAT rate (VATRATE) that differs from the exchange rate (RATE):
RATE: 11.4258
VATRATE: 11.2535
VAT amount: 250 EUR
Calculation:
Convert VAT amount using RATE: 250 EUR×11.4258=2 856.45 NOK
Convert VAT amount using VATRATE: 250 EUR×11.2535=2 813.375 NOK
Difference: 2,856.45−2,813.375=43.08
Accounting Impact:
This difference of 43.08 NOK is posted to ACD/VATRATEADJ.


The accounting will look like this:
