Sign MT940 D, C, RD and RC movements correctly
D decreases and C increases the account balance. RD reverses a debit and increases cash, while RC reverses a credit and decreases cash. Apply the sign once before testing the closing balance.
Open this sample in Air-Gapped ConverterWorked bank sample
Synthetic bank data for local reconciliation.
:20:REPORT-1
:25:EUR-OPERATING
:28C:007/1
:60F:C261130EUR100,00
:61:261130D25,00NTRFSIGN-0//BANK-0
:86:Sign test D
:61:261130C25,00NTRFSIGN-1//BANK-1
:86:Sign test C
:61:261130RD25,00NTRFSIGN-2//BANK-2
:86:Sign test RD
:61:261130RC25,00NTRFSIGN-3//BANK-3
:86:Sign test RC
:62F:C261130EUR100,00Field anatomy
| Field or path | Meaning in this file | Type or format | ERP or Excel import risk |
|---|---|---|---|
| D / C | Ordinary debit / credit | One letter | A positive debit overstates cash. |
| RD / RC | Reversal of debit / credit | Two letters | Flipping an already signed amount reverses it twice. |
Root cause and ERP fix
- A one-character parser misses reversals. Match RC and RD before single-letter marks.
- A journal import flips a negative amount again. Assign sign conversion to one stage.
- Offsetting sign errors pass a net test. Inspect all four signed movements individually.
Inspect with the MIT parser
Save the sample as mt940-debit-credit-reversal-signs.sta and the script as inspect.mjs. With @stmtrecon/parser installed, run node inspect.mjs mt940-debit-credit-reversal-signs.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 rows = report.transactions;
const signed = rows.map(({ mark, amount }) => [mark, amount]);
console.table(signed);Open this sample in Air-Gapped ConverterExport 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