Skip to content

Commit 40ec182

Browse files
Adicionado a validação de cancelamento fora do prazo
1 parent 4231101 commit 40ec182

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/br/com/swconsultoria/nfe/util/RetornoUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static void validaCancelamento(TRetEnvEvento retorno) throws NfeException
2525

2626
final String[] erro = {""};
2727
retorno.getRetEvento().forEach( retEvento -> {
28-
if (!StatusEnum.EVENTO_VINCULADO.getCodigo().equals(retEvento.getInfEvento().getCStat())) {
28+
if (!StatusEnum.EVENTO_VINCULADO.getCodigo().equals(retEvento.getInfEvento().getCStat()) &&
29+
!StatusEnum.CANCELAMENTO_FORA_PRAZO.getCodigo().equals(retEvento.getInfEvento().getCStat())) {
2930
erro[0] += retEvento.getInfEvento().getChNFe() + " - " +retEvento.getInfEvento().getCStat() + " - " + retEvento.getInfEvento().getXMotivo() + System.lineSeparator();
3031
}
3132
});

0 commit comments

Comments
 (0)