@@ -489,23 +489,28 @@ private RetornoRecepcaoEvento RecepcaoEvento(int idlote, List<evento> eventos, S
489489 SalvarArquivoXml ( idlote + "-ped-eve.xml" , xmlEvento ) ;
490490
491491 if ( _cFgServico . ValidarSchemas )
492- Validador . Valida ( servicoEvento , _cFgServico . VersaoRecepcaoEventoCceCancelamento , xmlEvento , cfgServico : _cFgServico ) ;
493-
494- var deveValidarDetEvento = DeveValidarDetalhamentoDoEvento ( servicoEvento ) ;
495-
496- if ( deveValidarDetEvento && _cFgServico . ValidarSchemas )
497492 {
498- foreach ( var evento in pedEvento . evento )
493+ Validador . Valida ( servicoEvento , _cFgServico . VersaoRecepcaoEventoCceCancelamento , xmlEvento ,
494+ cfgServico : _cFgServico ) ;
495+
496+ var deveValidarDetEvento = DeveValidarDetalhamentoDoEvento ( servicoEvento ) ;
497+
498+ if ( deveValidarDetEvento )
499499 {
500- var detEvento = evento . infEvento . detEvento ;
501- var detEventoXml = FuncoesXml . ClasseParaXmlString ( detEvento ) ;
502- if ( _cFgServico . RemoverAcentos )
503- detEventoXml = detEventoXml . RemoverAcentos ( ) ;
500+ foreach ( var evento in pedEvento . evento )
501+ {
502+ var detEvento = evento . infEvento . detEvento ;
503+ var detEventoXml = FuncoesXml . ClasseParaXmlString ( detEvento ) ;
504+ if ( _cFgServico . RemoverAcentos )
505+ detEventoXml = detEventoXml . RemoverAcentos ( ) ;
504506
505- Validador . Valida ( servicoEvento , _cFgServico . VersaoRecepcaoEventoCceCancelamento , detEventoXml , cfgServico : _cFgServico , validarLote : false ) ;
507+ Validador . Valida ( servicoEvento , _cFgServico . VersaoRecepcaoEventoCceCancelamento , detEventoXml , cfgServico : _cFgServico , validarLote : false ) ;
508+ }
506509 }
507510 }
508511
512+
513+
509514 var dadosEvento = new XmlDocument ( ) ;
510515 dadosEvento . LoadXml ( xmlEvento ) ;
511516
0 commit comments