Ir para conteúdo
  • Cadastre-se

Datacaixa

Membros Pro
  • Total de ítens

    212
  • Registro em

  • Última visita

Posts postados por Datacaixa

  1. Olá Daniel,

    Talvez eu não tenha sido bem claro, mas o que estou querendo é justamente mostrar essa mensagem:

    Schema XML: 225 - Rejeicao: Falha no Schema XML da NFe The 'http://www.portalfiscal.inf.br/nfe:NCM' element is invalid - The value '000334764' is invalid according to its datatype 'String' - The Pattern constraint failed."

    Da forma como utilizo atualmente só está mostrando:

    "Rejeição: Falha no Schema XML do lote de NFe"

  2. Olá Daniel, obrigado pelo retorno!

    Sim, eu já fiz várias validações aqui no sistema para evitar isso, mas caso isso ocorra gostaria de mostrar a mensagem completa em inglês mesmo que seria essa: Schema XML: 225 - Rejeicao: Falha no Schema XML da NFe The 'http://www.portalfiscal.inf.br/nfe:NCM' element is invalid - The value '000334764' is invalid according to its datatype 'String' - The Pattern constraint failed."

    Como consigo mostrar a mensagem acima através do componente da ACBr?

  3. Como faço para obter mais detalhes da rejeição de erro da NF-e tal como no validador da SEFAZ RS?

    Atualmente utilizamos da forma, mas só consigo obter o retorno "Rejeição: Falha no Schema XML do lote de NFe", mas quando passo o XML no validador de XML da SEFAZ RS retorna com mais detalhes da seguinte forma: "Schema XML: 225 - Rejeicao: Falha no Schema XML da NFe The 'http://www.portalfiscal.inf.br/nfe:NCM' element is invalid - The value '000334764' is invalid according to its datatype 'String' - The Pattern constraint failed."

     try  
    
      dmACBr.ACBrNFe1.Enviar('1', False, False);
    
    except on E : Exception do
    
      TVENDASMOTIVO_REJEICAO.AsString := Copy(E.Message,1,1500);


     

  4. Bom dia!

    Por exemplo a cidade de Lorena-SP utiliza o provedor SiapNet neste caso essa cidade não está relacionado na lista de cidades aderentes, entende-se então que não utilizará o padrão nacional, porém se nesta mesma cidade um MEI for emitir a NFS-e o correto seria configurar o padrão nacional?

    No caso das cidades que já aderiram ao padrão nacional, quando eu executar a "function" que traz o provedor conforme o código do município neste caso a function retornaria o padrão nacional ou o provedor "antigo"?

  5. No manual mais recente da NF-e não encontrei mais os campos:

    NFe.exporta.UFembarq
    NFe.exporta.xLocEmbarq
    

    Existem agora somente:

    NFe.exporta.UFSaidaPais
    NFe.exporta.xLocExporta
    NFe.exporta.xLocDespacho

    Realmente os 2 campos acima foram removidos? Seria questão de remover também no componente?

  6. Na orientação que está no DistribuicaoDFe.txt informa para "Utilizar o número que esta no campo: Último NSU", mas fiquei um pouco confuso, pois não seria o correto salvar o maxNSU para utilizar na próxima consulta para download dos arquivos XML da SEFAZ?

    Atualmente está como abaixo, sendo que salvo o iUltNSU no banco de dados para enviar na próxima consulta:

     dmAcbr.ACBrNFe1.DistribuicaoDFePorUltNSU(dmconexao.TFILIALCODIGO_ESTADO.AsInteger,
          sapenasnumeros(dmconexao.TFILIALCNPJ.AsString), inttostr(iUltNSU));
    
     iUltNSU := StrToIntDef(dmAcbr.ACBrNFe1.WebServices.DistribuicaoDFe.retDistDFeInt.ultNSU, 0);
     iMaxNSU := StrToIntDef(dmAcbr.ACBrNFe1.WebServices.DistribuicaoDFe.retDistDFeInt.maxNSU, 0);

     

  7. Na rotina abaixo, caso a NF-e já esteja com o evento de Ciência da Emissão realizado, realizado por outro sistema ou alguma outra forma que a NF-e já esteja com esse evento registrado, qual seria o retorno abaixo? Continuaria retornando 135?

    dmAcbr.ACBrNFe1.EventoNFe.Evento.Clear;
       with dmAcbr.ACBrNFe1.EventoNFe.Evento.New do
       begin
         InfEvento.cOrgao := 91;
         InfEvento.chNFe := sChave;
         InfEvento.CNPJ := sApenasNumeros(dmConexao.TFILIALCNPJ.AsString);
         InfEvento.dhEvento := Now;
         InfEvento.tpEvento := teManifDestCiencia;
       end;
    
       dmAcbr.ACBrNFe1.EnviarEvento(StrToInt('1'));
    
       if dmAcbr.ACBrNFe1.WebServices.EnvEvento.EventoRetorno.retEvento.Items[0].RetInfEvento.cStat = 135 then


     

  8. No exemplo do Curso de Distribuição DFe vocês trataram para pegar o XML Resumido dentre outros, mas por que dentro da mesma rotina não foi adicionado também a opção do XML Completo? Ou seja, por que aqui na rotina abaixo também não foi adicionado a seguinte condição:
     

        if (Trim(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip[I].procNfe.chDFe) <> '') then  //XMLCompleto
    

    Teria algum problema adicionar a condição acima no código abaixo do exemplo de vocês?

    lCStat := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.cStat;
      case lCStat of
        137 : result:= False;  //Nenhum Documento Localizado - Consulta deve ser interrompida por 1 hora
        138 : begin //Documentos Encontrados
                FultNSU := StrToIntDef(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.ultNSU,0);
                FmaxNSU := StrToIntDef(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.maxNSU,0);
    
                for I := 0 to FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Count - 1 do
                begin
                  if Terminated then
                    Break;
                  try
                    FRetornoNSU:= TDFeRetornoNSU.Create();
                    FRetornoNSU.NSU := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].NSU;
                    FRetornoNSU.schema := SchemaDFeToStr( FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].schema );
                    FRetornoNSU.XML := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].XML;
                    FRetornoNSU.arquivo := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].NomeArq;
                    FRetornoNSU.UltNSU := IntToStr(FUltNSU);
    
                    if (Trim(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip[I].resDFe.chDFe) <> '') then  //ResumoDFe
                    begin
                      FRetornoNSU.chDFe := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.chDFe;
                      FRetornoNSU.CNPJCPF := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.CNPJCPF;
                      FRetornoNSU.xNome := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.xNome;
                      FRetornoNSU.IE := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.IE;
                      FRetornoNSU.dhEmi := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.dhEmi;
                      FRetornoNSU.tpNF := tpNFToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.tpNF);
                      FRetornoNSU.vNF := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.vNF;
                      FRetornoNSU.digVal := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.digVal;
                      FRetornoNSU.dhRecbto := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.dhRecbto;
                      FRetornoNSU.cSitNFe := SituacaoDFeToStr( FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.cSitDFe );
                      FRetornoNSU.nProt := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resDFe.nProt;
                    end;
    
                    if (Trim(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip[I].resEvento.chDFe) <> '') then  //ResumoEvento
                    begin
                      FRetornoNSU.chDFe := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.chDFe;
                      FRetornoNSU.CNPJCPF := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.CNPJCPF;
                      FRetornoNSU.dhEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.dhEvento;
                      FRetornoNSU.tpEvento := tpEventoToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.tpEvento);
                      FRetornoNSU.xEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.xEvento;
                      FRetornoNSU.nSeqEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.nSeqEvento;
                      FRetornoNSU.dhRecbto := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.dhRecbto;
                      FRetornoNSU.cOrgao := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.cOrgao;
                      FRetornoNSU.nProt := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].resEvento.nProt;
    
                    end;
    
                    if (Trim(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip[I].procEvento.detEvento.versao) <> '' ) then //DetalhamentoEventos
                    begin
                      FRetornoNSU.chDFe := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.chDFe;
                      FRetornoNSU.CNPJ := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.CNPJ;
                      FRetornoNSU.dhEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.dhEvento;
                      FRetornoNSU.tpEvento := tpEventoToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.tpEvento);
                      FRetornoNSU.verEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.verEvento;
                      FRetornoNSU.nSeqEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.nSeqEvento;
                      FRetornoNSU.Id := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.Id;
                      FRetornoNSU.cOrgao := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.cOrgao;
                      FRetornoNSU.descEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.descEvento;
                      FRetornoNSU.xJust := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.xJust;
                      FRetornoNSU.xMotivo := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.xCorrecao;
                      FRetornoNSU.EmiCNPJ := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.emit.CNPJ;
                      FRetornoNSU.EmiIE := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.emit.IE;
                      FRetornoNSU.EmixNome := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.emit.xNome;
                      FRetornoNSU.cteNProt := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.CTe.nProt;
                      FRetornoNSU.cteChvCte := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.CTe.chCTe;
                      FRetornoNSU.cteDhemi := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.CTe.dhEmi;
                      FRetornoNSU.cteModal := tpModalToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.CTe.modal);
                      FRetornoNSU.cteDhRebcto := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.detEvento.CTe.dhRecbto;
    
                    end;
    
                    if (Trim(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip[I].procEvento.RetinfEvento.Id) <> '' ) then  //InfEvento
                    begin
                      FRetornoNSU.Id := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.Id;
                      FRetornoNSU.VerAplic := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.verAplic;
                      FRetornoNSU.tpAmb := TpAmbToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.tpAmb);
                      FRetornoNSU.chDFe := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.chDFe;
                      FRetornoNSU.CStat := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.cStat;
                      FRetornoNSU.CNPJDest := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.CNPJDest;
                      FRetornoNSU.cOrgaoAutor := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.cOrgaoAutor;
                      FRetornoNSU.dhRegEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.dhRegEvento;
                      FRetornoNSU.tpEvento := tpEventoToStr(FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.tpEvento);
                      FRetornoNSU.nSeqEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.nSeqEvento;
                      FRetornoNSU.xEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.xEvento;
                      FRetornoNSU.xMotivo := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.xMotivo;
                      FRetornoNSU.dhRegEvento := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.dhRegEvento;
                      FRetornoNSU.emailDest := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.emailDest;
                      FRetornoNSU.nProt := FACBrNFe.WebServices.DistribuicaoDFe.retDistDFeInt.docZip.Items[I].procEvento.RetinfEvento.nProt;
    
                    end;
    
                  finally
                    if not Terminated then
                      Synchronize(DoDFeRetornoNSU);
                    FRetornoNSU.Free;
                  end;
    
                end;


     

  9. Terminei de fazer o curso de Distribuição DFe mas fiquei com uma dúvida referente a rotina e sequência de NSU:

    - Caso eu der Ciência da Operação em um documento isso gera outro NSU, ou seja, essa nota vai para o final da fila?

    Por exemplo, se estou fazendo um repeat de acordo com último NSU até o máximo NSU, e no meio desse intervalo tem uma nota que ainda não tem o XML disponível e preciso dar Ciência da Operação, posso continuar rodando o repeat que essa nota vai vir depois com o XML completo?

×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.

The popup will be closed in 10 segundos...