# CII-DT-031

Source: https://xmlvalid.com/rules/CII-DT-031

> currencyID should not be present

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `//ram:*[ends-with(name(), 'Amount') and not (self::ram:TaxTotalAmount)]`
- Test: `not(@currencyID)`

## Why it fails

- Amounts carry a `currencyID` attribute, which CII invoices under EN 16931 leave out: the currency is given once, in `ram:InvoiceCurrencyCode`.
- A generator that also writes UBL, where every amount has a `currencyID`, added it to CII amounts as well.

## How to fix it

- Remove `currencyID` from every amount except `ram:TaxTotalAmount`, which keeps it so a VAT total in the accounting currency (BT-111) can be told apart.

Validate a document against these rules: https://xmlvalid.com/validate
