NFE-679

The rule sets below word this rule differently; each wording is shown with its rule set.

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.

Message

Rejeição: Chave de Acesso referenciada com Modelo inválido [nOcor: …] (modelo …).

Context
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refNFe
Test
substring($k, 21, 2) = ('55', '65', '59')

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

Message

Rejeição: Chave de Acesso referenciada com Modelo inválido [nOcor: …] (NF-e de saída referencia o modelo …, a partir de …).

Context
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refNFe
Test
not($ide/nfe:tpNF = '1' and not($ide/nfe:finNFe = ('2', '4')) and exists($emitted) and $emitted ge $modelFrom) or not(substring($k, 21, 2) = ('65', '59'))

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

Message

Rejeição: Chave de Acesso referenciada com Modelo inválido [nOcor: …] (CT-e modelo …).

Context
nfe:infNFe/nfe:ide/nfe:NFref/nfe:refCTe
Test
substring($k, 21, 2) = '57'

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