Nota Fiscal (NF-e) Rejeitada – Motivo element ‘AAMM’ is not valid
A mensagem de rejeição (conforme exemplo abaixo) ocorre quando é referenciada na nota fiscal eletrônica uma nota de modelo 1, ou seja, não eletrônica, e é preenchido indevidamente/inadequadamente TNOT_NOTA_CPF_CNPJ_ORIGEM.
Como já estava preenchida as informações do documento de origem na coluna TNOT_NF_ORIGEM, não precisa do preenchimento da coluna TNOT_NOTA_CPF_CNPJ_ORIGEM.
“Retorno SEFAZ -> Status: 999 Motivo: (null: 1, 724): cvc-pattern-valid: Value ‘912’ is not facet-valid with respect to pattern ‘[0-9]{2}[0]{1}[1-9]{1} [pipe] [0-9]{2}[1]{1}[0-2]{1}’ for type ‘#AnonType_AAMMrefNFPNFrefideinfNFeTNFe’. [quebra] (null: 1, 724): cvc-type.3.1.3: The value ‘912’ of element ‘AAMM’ is not valid. [quebra] (null: 1, 774): cvc-enumeration-valid: Value ‘1’ is not facet-valid with respect to enumeration ‘[01, 04]’. It must be a value from the enumeration. [quebra] (null: 1, 774): cvc-type.3.1.3: The value ‘1’ of element ‘mod’ is not valid. [quebra] (null: 1, 794): cvc-pattern-valid: Value ‘25829’ is not facet-valid with respect to pattern ‘0 [pipe] [1-9]{1}[0-9]{0,2}’ for type ‘TSerie’. [quebra] (null: 1, 794): cvc-type.3.1.3: The value ‘25829’ of element ‘serie’ is not valid. [quebra] (null: 1, 803): cvc-complex-type.2.4.b: The content of element ‘refNFP’ is not complete. One of ‘{“http://www.portalfiscal.inf.br/nfe”:nNF}’ is expected. [quebra]”
SOLUÇÃO: Deve acessar com o usuario APPUSER, aplicar o comando abaixo e limpar os dados da coluna:
select a.tnot_nota_cpf_cnpj_origem from tnot_nota_nfe a where
a.tnot_unidade_fk_pk =&UNIDADE for update
Em seguida, reenviar a nota, e a mesma será autorizada pela Sefaz e liberada da monitoração.