NFE-1047

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

In English The effective municipal IBS rate (gIBSMun/gRed/pAliqEfet) is not pIBSMun × (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($mun/nfe:gRed) or abs(br:dec($mun/nfe:gRed/nfe:pAliqEfet) - round(br:dec($mun/nfe:pIBSMun) * (1 - br:dec($mun/nfe:gRed/nfe:pRedAliq) div 100) * $reducer, 4)) le 0.0001

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