BAI2 — CAD and JPY: minor units scale with the currency
BAI2 amounts carry no decimal point: they are minor units, and how many decimals they imply depends on the currency. In this file "2500000" is CAD 25,000.00 on the CAD account (2 decimals) and ¥2,500,000 on the JPY account (0 decimals). The CAD account also leaves its currency field empty and inherits it from the 02 group header. A hardcoded division by 100 corrupts the yen account by two orders of magnitude — and the balance still reconciles, because all three figures are wrong by the same factor.
BAI2 (BAI version 2) — Valid
BAI2 amounts carry no decimal point: they are minor units, and how many decimals they imply depends on the currency. In this file "2500000" is CAD 25,000.00 on the CAD account (2 decimals) and ¥2,500,000 on the JPY account (0 decimals). The CAD account also leaves its currency field empty and inherits it from the 02 group header. A hardcoded division by 100 corrupts the yen account by two orders of magnitude — and the balance still reconciles, because all three figures are wrong by the same factor.
What this file shows
BAI2 amounts carry no decimal point: they are minor units, and how many decimals they imply depends on the currency. In this file "2500000" is CAD 25,000.00 on the CAD account (2 decimals) and ¥2,500,000 on the JPY account (0 decimals). The CAD account also leaves its currency field empty and inherits it from the 02 group header. A hardcoded division by 100 corrupts the yen account by two orders of magnitude — and the balance still reconciles, because all three figures are wrong by the same factor.
| Transactions | 4 |
|---|
Every party, IBAN and amount below is fictitious. The IBANs are structurally valid — they pass the mod-97 check — but they belong to no real account.
File content
01,000300012,ACMECANADA,260711,0800,4,80,10,2/
02,ACMECANADA,000300012,1,260710,2400,CAD,2/
03,1234567,,010,2500000,,,015,2830000,,/
16,165,450000,,ACH20260710F,CUSTOMER-PAY,PREAUTHORIZED ACH CREDIT MAPLE RETAIL INC/
16,475,120000,,CHQ00004501,CHEQUE-4501,CHEQUE PAID 4501/
49,5900000,4/
03,7654321,JPY,010,1000000,,,015,2750000,,/
16,195,2500000,,SWIFT0000021,JPY-WIRE-IN,INCOMING WIRE TOKYO DISTRIBUTION KK/
16,495,750000,,SWIFT0000022,JPY-WIRE-OUT,OUTGOING WIRE OSAKA LOGISTICS KK/
49,7000000,4/
98,12900000,2,10/
99,12900000,1,12/
How we know these results hold
Every file in this library is run through the site's own validator on each build. The expected result stated above is asserted by an automated test — if a file stopped matching what this page claims, the build would fail. Two inherited fixtures were repaired this way before publication: three IBANs failed the mod-97 check and several names used characters outside the basic SEPA character set.