# NFE-1038

Source: https://xmlvalid.com/rules/NFE-1038

> Rejeição: DF-e Referenciado não informado (DFeReferenciado/chaveAcesso).

- Level: error
- Rule sets: SEFAZ authorisation rules of NF-e 4.00 MOC 7.0 Anexo I, NTs up to 2026.010
- Context: `nfe:infNFe`
- Test: `not($debit = ('03', '04') or $credit = '06') or $itemRefs/nfe:chaveAcesso`

In English: Debit notes of type 03 and 04 and credit notes of type 06 must reference the document per item (DFeReferenciado/chaveAcesso).

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