Agio calculation
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)
Agio calculation in PAR will create 3 ATR 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 based on change in exchange rate from last period to current period (Rate at the last day of the period), as these transactions already have had agio calculated last period.
For all transactions (CAT & SAT) that are open by the end of current period and also registered in current period. Agio will be calculated based on change in exchange rate from the transaction document to current period (Rate at the last day of the period).
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 based on change in exchange rate from last period to current period (Rate at the last day of the period), as these transactions already have had agio calculated last period.
For all transactions (ATR items) that are registered in current period. Agio will be calculated based on change in exchange rate from ATR item that are registered to current period (Rate at the last day of the period).
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 the next month, the open post will be agio calculated from the previous period rate to the new period rate.
The new period rate is 1,4.
(100*1,4) - (100*1,2) = 20This means an agio profit of 20 USD.
Relevant report: FRP > ACCBAL > GL Account Balances, from AGIO calculations.
Exchange Rates on Customer and Supplier Payments
The way RamBase handle agio on payments are depending on if agio is set up on GL Account for Account Receivables and Account Payables. If agio is not used, RamBase will use the exchange rate from the transaction document (Meaning the second method described below will always be used).
If agio is used on GL Account for Account Receivables and Account Payables, exchange rate on payments will be handled this way:
For all invoices and credit notes that are linked to a payment and registered in an earlier period than the payment. Exchange rate from the end of last period will be used to calculate the value in local currency, as these transactions already have had agio calculated last period.
For all invoices and credit notes that are linked to a payment and registered in the same period as the payment. Exchange rate from the transaction document will be used to calculate the value in local currency.
Payment in currency different than currency on invoice being settled
![Finans_mail_1.jpg](../../../image/uuid-eeb885bf-d6ca-90f5-ada9-f29e775ec18a.jpg)
![finans_mail_2.jpg](../../../image/uuid-a4bf91d5-92cd-e05e-814c-a6c7d02f676e.jpg)
The above payment is made for a bank account in NOK but the customer invoice being settled is in another currency, in this example it is in EUR. The sales invoice amount is 125 EUR and it was registered 2022.11.04. The RATE on the sales invoice was 10,3543. The PAY has CURDATE:2022.12.19. RATE this date is 10,4833, RATE the 2022.11.30 was 10,3313.
Explanation to the «DevAmt»: This is the difference between the value of the invoice based on RATE of the CURDATE and what is received in bank:
125*10,4833=1 310,41
1390,50-1310,41=80,09
The user must decide how this deviation should be posted to the GL
Explanation to the «CurAdj»: For invoices and credit notes that are linked to a payment and registered in an earlier period than the payment, exchange rate from the end of last period will be used to calculate the value in local currency, as these transactions already have had agio calculated last period.
125*10.4833=1 310,41
125*10.3313=1 291,41
1 310,41-1 291,41=19,00
This deviation is posted against the default account set up in Account Default setting (ACD), Currency deviation on Payments.
![finans_mail_3.jpg](../../../image/uuid-eabff887-f873-d5dd-81dc-0b3580de7266.jpg)
The accounting for the above payment will look like this:
![finans_mail_4.jpg](../../../image/uuid-acc64c59-0095-6636-06fe-9fdaa5293190.jpg)