NFE-1035

Rejeição: Valor da Alíquota Efetiva do IBS da UF calculado incorretamente [nItem: …] (pAliqEfet …, calculado …).

In English The effective state IBS rate (gIBSUF/gRed/pAliqEfet) is not pIBSUF × (1 - pRedAliq/100), times (1 - pRedutor/100) in a government purchase, rounded to four decimals.

error: the document is invalid

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
nfe:infNFe/nfe:det/nfe:imposto/nfe:IBSCBS/nfe:gIBSCBS
Test
not($uf/nfe:gRed) or abs(br:dec($uf/nfe:gRed/nfe:pAliqEfet) - round(br:dec($uf/nfe:pIBSUF) * (1 - br:dec($uf/nfe:gRed/nfe:pRedAliq) div 100) * $reducer, 4)) le 0.0001

Checked with NF-e 4.00, NF-e 4.00 with authorisation protocol