# MYDATA-312

Source: https://xmlvalid.com/rules/MYDATA-312

> Sum of classifications with type and category not matching with related total in invoice summary: ….

- Level: error
- Rule sets: myDATA checks of AADE (Greece) myDATA 2.0.2 of September 2026
- Context: `inv:invoiceSummary[inv:incomeClassification]`
- Test: `every $c in inv:incomeClassification satisfies gr:same(gr:dec($c/icls:amount), gr:sum($lines[concat(normalize-space(icls:classificationType), '|', normalize-space(icls:classificationCategory)) = concat(normalize-space($c/icls:classificationType), '|', normalize-space($c/icls:classificationCategory))]/icls:amount))`

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