# DT-CIUS-PT-172

Source: https://xmlvalid.com/rules/DT-CIUS-PT-172

> The VAT category tax amount (BT-117) in a VATBReakdown (BG-23) where VAT category code (BT-118) is "Lower rate" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119), with an acceptance range of 1.00 € (it does not mean that this tolerance is accepted by the customer).

- Level: error
- Rule sets: CIUS-PT rules (Portugal, UBL) 2.1.1
- Context: `cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'AA' or normalize-space(cbc:ID) = 'RED' or normalize-space(cbc:ID) = 'INT']`
- Test: `((round((xs:decimal(../cbc:TaxableAmount) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100) <= (xs:decimal(../cbc:TaxAmount) + 1.00) and (round((xs:decimal(../cbc:TaxableAmount) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100) >= (xs:decimal(../cbc:TaxAmount) - 1.00))`

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