Working with data
Foreign currency
An amount without a currency is not an amount. A bank movement of 1,000.00 and a ledger posting of 1,000.00 are the same number and may be entirely different sums of money. So nothing in VLDTION compares them unless the currency is known and either identical or reconciled through a rate your own data carries.
Amounts are integers
Every comparison, conversion and total in the reconciliation path runs in integer minor units, agorot, cents, yen. Binary floating point does not think 0.1 + 0.2 is 0.3, and an accounting result must never depend on that.
| Currency | Minor unit | Digits |
|---|---|---|
| ILS, שקל חדש | Agora | 2 |
| USD | Cent | 2 |
| EUR | Cent | 2 |
| GBP | Penny | 2 |
| CHF | Rappen | 2 |
| JPY | None | 0 |
The number of digits comes from a table, not from an assumption that every currency has two. A currency VLDTION does not recognise is reported as unrecognised; it is never read as shekels because the client is Israeli.
Where a rate comes from
VLDTION does not fetch exchange rates and will not. A rate that did not come from the accountant’s own records is not evidence of anything, and a review tool that quietly reached out to a market data feed would be making up the numbers on a working paper.
| Source | What it means |
|---|---|
| Statement | The bank statement printed the rate on the movement |
| Ledger | The accounting system recorded the rate on the posting |
| Derived | The posting carries both the foreign and the local amount, and the rate follows from them |
| Reviewer | A person entered it, and the record says who |
Where both sides carry a rate and they disagree, the statement’s wins. It is the record of what the bank actually did: and the match names which rate it used and why.
How a converted match is decided
- Same currency: compared directly, within one agora.
- Different currencies with a rate in the data. The bank side is converted into the ledger's currency and compared within the stated allowance.
- Different currencies with no rate, never matched. The movement is reported as BANK-007, with the currencies involved and the fact that no rate exists in either record.
The arithmetic is shown, every time
Rounding, stated once
- Amounts are held to the currency's own number of digits.
- Rates are held to six decimal places, as integers scaled by a million.
- A conversion multiplies in scaled integers and rounds once, at the end. Half away from zero, the way a person doing it by hand would.
- Converting the same amount at the same rate gives the same minor-unit result on every machine, in any order.
The allowance for a converted comparison is 0.5% or two minor units, whichever is larger, and it is printed on every match that relied on it. It has to cover rounding at both ends and the ordinary gap between the rate the bank used and the rate the ledger recorded.
What a small difference is not
A difference after conversion may be a rate, a rounding, a timing difference, a fee or a bank charge. VLDTION does not classify it for you. It shows the original amount, the rate, the converted amount, the ledger amount and the difference, and the deterministic rules decide only whether the difference is material enough to raise.
Performance
A converted lookup uses an index whose bucket width is the comparison tolerance, so three probes cover the allowance at any magnitude: ₪12.30 and ₪12,300,000 cost the same to look up. Matching does not become a scan when a second currency appears, and the benchmark suite asserts that at half a million records on each side.