Currency

Rock supports a single currency and that currency should be set via the “Organization Currency Code” Global Attribute.

This attribute tells the system that all currency values are in this currency. If you change this currency the values will NOT get updated. Rock will just display the new currency symbol and format.

Rock has been updated to support payment gateways which support multiple currencies. These gateways are responsible for calculating the value that should be stored in Rock. For example if the user is giving in Euro, and the Organization’s Rock Instance is using USD, it is the responsibility of the gateway to convert Euro to USD and return the USD value which will get saved to Rock.In this case, Rock will display both the Euro and USD value, but only the USD value with be used for calculations.

Usage in Data Model

Although only one special gateway currently handles transactions in foreign currencies, when a transaction is created which has a foreign currency associated with it, the gateway will:

  • Store the foreign currency ‘code’ (from the Currency Code defined type) into the FinancialTransaction.ForeignCurrencyCodeValueId property.

  • Store the foreign currency amount into the corresponding FinancialTransactionDetail.ForeignCurrencyAmount property.

  • Store the Organization’s currency (typically USD) amount into the corresponding FinancialTransactionDetail.Amount property.

For a scheduled transaction (i.e. recurring gift) of a foreign currency, it is handled a bit differently. This is because the exact amount of the individual’s foreign currency can only be converted to the organization’s currency amount at the time of the actual transaction. That is because foreign exchange rates are always changing. Therefore, when a scheduled transaction is created which has a foreign currency associated with it, the gateway will:

  • Store the foreign currency ‘code’ (from the Currency Code defined type) into the FinancialScheduledTransaction.ForeignCurrencyCodeValueId property.

  • Store the foreign currency amount into the corresponding FinancialScheduledTransactionDetail.Amount property.

Again, until an actual financial transaction occurs for that scheduled-transaction, it is not possible to know the non-foreign currency (USD) value. However once it occurs, the transaction should be recorded as described in the section above.

Last updated