StmtRecon
MT940 fields and statement controls

Parse the optional funds code in MT940 :61:

An optional letter between the debit or credit mark and the amount can report the third character of the funds currency code. The letter alone cannot identify a currency or establish an exchange rate.

Open this sample in Air-Gapped Converter

Worked bank sample

Synthetic bank data for local reconciliation.

:20:REPORT-1
:25:EUR-OPERATING
:28C:007/1
:60F:C261130EUR100,00
:61:2611301130CR25,00NTRFFUNDS-01//REF-09
:86:Funds code R in a EUR statement
:62F:C261130EUR125,00

Field anatomy

Field or pathMeaning in this fileType or formatERP or Excel import risk
After C in CR25,00Optional funds code ROne uppercase letterTreating CR as a reversal loses the credit.
:60F: currencyStatement currencyThree lettersDeriving a full currency from R is ambiguous.

Root cause and ERP fix

  1. A fixed offset consumes the first amount digit when the letter is absent. Parse the optional token.
  2. A parser treats CR as RC. Inspect the mark and the following funds letter in order.
  3. Treasury used the letter for FX conversion. Obtain the full currency and exchange rate from the advice.

Inspect with the MIT parser

Save the sample as mt940-optional-funds-code.sta and the script as inspect.mjs. With @stmtrecon/parser installed, run node inspect.mjs mt940-optional-funds-code.sta.

import { readFile } from 'node:fs/promises';
import { inspect } from '@stmtrecon/parser';
const text = await readFile(process.argv[2], 'utf8');
const report = inspect(text, { transactions: true });
const lines = text.split(/\r?\n/).filter(line => line.startsWith(':61:'));
const parts = lines[0].match(/^:61:\d{6}(?:\d{4})?(RC|RD|C|D)([A-Z])?(?=\d)/);
console.log(parts[1], parts[2], report.currency);
Open this sample in Air-Gapped Converter

Export a multi-sheet Excel workbook with balance checks and batch reconciliation on your device. No Node installation or cloud upload is required.

npm package · SDK source · Format reference

Related MT940 fields and statement controls

Export your full workbook

Purchases are currently unavailable. Existing licenses can be activated offline.