Ir para conteúdo
  • Cadastre-se

carlosmarian

Membros
  • Total de ítens

    235
  • Registro em

  • Última visita

  • Days Won

    1

Posts postados por carlosmarian

  1. Olá...

     

    Algum retorno sobre este assunto?

     

    É que estou tendo o erro ao usar threads.

      Verifiquei que no método "TCertificadosConf.GetCertificado" da unit ACBrCTeConfiguracoes, existe a chamada "CoInitialize(nil)" com o comentário "PERMITE O USO DE THREAD".

      Coloquei este mesmo código "CoInitialize(nil);" no método "TCertificadosConf.GetCertificado" da unit "ACBrNFeConfiguracoes" e o erro parou de ocorrer.

     

     

    at+++

  2. Olá,

       acho que a conversão :

       

      function StrToIndCredOri(var ok: boolean; const s: string): TACBrIndCredOri;
    

    não foi replicada para a nova estrutura.

     

    Sugestão:

    function IndCredOriToStr(AValue: TACBrIndCredOri): string;
    function StrToIndCredOri(AValue: string): TACBrIndCredOri;
    
    
    function IndCredOriToStr(AValue: TACBrIndCredOri): string;
    begin
       if AValue = TACBrIndCredOri.icoOperProprias then
          Result := '0'
       else
       if AValue = TACBrIndCredOri.icoEvenFusaoCisao then
          Result := '1';
    end;
    
    function StrToIndCredOri(AValue: string): TACBrIndCredOri;
    begin
       if AValue = '0' then
          Result := TACBrIndCredOri.icoOperProprias
       else
       if AValue = '1' then
          Result := TACBrIndCredOri.icoEvenFusaoCisao;
    end;
    

     

     

    at+

  3. Olá,

       até onde eu lembro a propriedade "NomeArquivo" recebia somente o nome exemplo "Boleto.PDF" e a propriedade "DirArqPDF_HTML" era definido o caminho para a geração do arquivo exemplo "c:\temp".

       Então agora temos que passar o caminho completo na propriedade "NomeArquivo"? Exempo : "c:\temp\Boleto.PDF".

     

     

    At+

  4. e o fonte 

    function TProcNFe.GerarXML: boolean;
      function PreencherTAG(const TAG: string; Texto: string): string;
      begin
        result := '<' + TAG + '>' + RetornarConteudoEntre(Texto, '<' + TAG + '>', '</' + TAG + '>') + '</' + TAG + '>';
      end;
    var
      XMLNFe: TstringList;
      XMLinfProt: TstringList;
      XMLinfProt2: TstringList;
      wCstat: string;
      xProtNFe,
      nProtLoc: string;
      LocLeitor: TLeitor;
      i : Integer;
      ProtLido : Boolean; //Protocolo lido do arquivo
    begin
      Result := False;
      ProtLido := False;
      // Alterado por Italo em 28/09/2012
    
    //  if retornarVersaoLayout(FSchema, tlProcNFe) = '1.10' then
    //  begin
    
        XMLNFe := TStringList.Create;
        XMLinfProt := TStringList.Create;
        XMLinfProt2 := TStringList.Create;
        xProtNFe := '';
        FnProt := '';
    
        // Arquivo NFe
        if not FileExists(FPathNFe) then
          Gerador.wAlerta('XR04', 'NFE', 'NFE', ERR_MSG_ARQUIVO_NAO_ENCONTRADO)
        else
          XMLNFE.LoadFromFile(FPathNFe);
        FchNFe := RetornarConteudoEntre(XMLNFE.Text, 'Id="NFe', '"');
        if trim(FchNFe) = '' then
          Gerador.wAlerta('XR01', 'ID/NFE', 'Numero da chave da NFe', ERR_MSG_VAZIO);
    
        if (FPathRetConsReciNFe = '') and (FPathRetConsSitNFe = '') then
         begin
          if (FchNFe = '') and (FnProt = '') then
             Gerador.wAlerta('XR06', 'RECIBO/SITUAÇÃO', 'RECIBO/SITUAÇÃO', ERR_MSG_ARQUIVO_NAO_ENCONTRADO)
          else
             ProtLido := True;
         end;
    
        // Gerar arquivo pelo Recibo da NFe                                       //
        if (FPathRetConsReciNFe <> '') and (FPathRetConsSitNFe = '') and (not ProtLido) then
        begin
          if not FileExists(FPathRetConsReciNFe) then
            Gerador.wAlerta('XR06', 'PROTOCOLO', 'PROTOCOLO', ERR_MSG_ARQUIVO_NAO_ENCONTRADO)
          else
          begin
            I := 0;
            LocLeitor := TLeitor.Create;
            LocLeitor.CarregarArquivo(FPathRetConsReciNFe);
            while LocLeitor.rExtrai(1, 'protNFe', '', i + 1) <> '' do
             begin
               if LocLeitor.rCampo(tcStr, 'chNFe') = FchNFe then
                 FnProt := LocLeitor.rCampo(tcStr, 'nProt');
               if trim(FnProt) = '' then
                 Gerador.wAlerta('XR01', 'PROTOCOLO/NFe', 'Numero do protocolo', ERR_MSG_VAZIO)
               else
                begin
                 xProtNFe := LocLeitor.rExtrai(1, 'protNFe', '', i + 1)+'</protNFe>';
                 Gerador.ListaDeAlertas.Clear;
                 break;
                end;
                I := I + 1;
             end;
             LocLeitor.Free;
          end;
        end;
    
        // Gerar arquivo pelo arquivo de consulta da situação da NFe              //
        if (FPathRetConsReciNFe = '') and (FPathRetConsSitNFe <> '') and (not ProtLido) then
        begin
          if not FileExists(FPathRetConsSitNFe) then
            Gerador.wAlerta('XR06', 'SITUAÇÃO', 'SITUAÇÃO', ERR_MSG_ARQUIVO_NAO_ENCONTRADO)
          else
          begin
            XMLinfProt.LoadFromFile(FPathRetConsSitNFe);
    
            wCstat:=RetornarConteudoEntre(XMLinfProt.text, '<cStat>', '</cStat>');
            if ((trim(wCstat) = '101') or
                (trim(wCstat) = '151') or
                (trim(wCstat) = '155')) then //esta cancelada
               XMLinfProt2.Text:=RetornarConteudoEntre(XMLinfProt.text, '<infCanc', '</infCanc>')
            else
               XMLinfProt2.Text:=RetornarConteudoEntre(XMLinfProt.text, '<infProt', '</infProt>');
    
            //0011641/0011373 - Controle da tag "InfProt";
            nProtLoc := RetornarConteudoEntre(XMLinfProt2.text, '<nProt>', '</nProt>');
            // Alterado por Italo em 28/09/2012
            xProtNFe :=
              '<protNFe versao="' + Versao + '">' +
            (******)'<infProt Id="ID'+ nProtLoc +'">'+// + RetornarConteudoEntre(XMLinfProt.text, '<infProt', '<tpAmb>') +
            (*********)PreencherTAG('tpAmb', XMLinfProt.text) +
            (*********)PreencherTAG('verAplic', XMLinfProt.text) +
            (*********)PreencherTAG('chNFe', XMLinfProt.text) +
            (*********)PreencherTAG('dhRecbto', XMLinfProt2.text) +
            (*********)PreencherTAG('nProt', XMLinfProt2.text) +
            (*********)PreencherTAG('digVal', XMLinfProt.text) +
            (*********)PreencherTAG('cStat', XMLinfProt.text) +
            (*********)PreencherTAG('xMotivo', XMLinfProt.text) +
            (******)'</infProt>' +
            {****}'</protNFe>';
          end;
        end;
    
        if ProtLido then
         begin
            //0011641/0011373 - Controle da tag "InfProt";
            xProtNFe :=
              '<protNFe versao="' + Versao + '">' +
            (******)'<infProt Id="'+ IIf( Pos('ID', FnProt) > 0, FnProt, 'ID'+ FnProt ) +'">'+
            (*********)'<tpAmb>'+TpAmbToStr(FtpAmb)+'</tpAmb>'+
            (*********)'<verAplic>'+FverAplic+'</verAplic>'+
            (*********)'<chNFe>'+FchNFe+'</chNFe>'+
            (*********)'<dhRecbto>'+FormatDateTime('yyyy-mm-dd"T"hh:nn:ss',FdhRecbto)+'</dhRecbto>'+
            (*********)'<nProt>'+FnProt+'</nProt>'+
            (*********)'<digVal>'+FdigVal+'</digVal>'+
            (*********)'<cStat>'+IntToStr(FcStat)+'</cStat>'+
            (*********)'<xMotivo>'+FxMotivo+'</xMotivo>'+
            (******)'</infProt>'+
            {****}'</protNFe>';
    
         end;
    
        // Gerar arquivo
        if Gerador.ListaDeAlertas.Count = 0 then
        begin
          Gerador.ArquivoFormatoXML := '';
          Gerador.wGrupo(ENCODING_UTF8, '', False);
          Gerador.wGrupo('nfeProc versao="' + Versao + '" ' + NAME_SPACE, '');
          Gerador.wTexto('<NFe xmlns' + RetornarConteudoEntre(XMLNFE.Text, '<NFe xmlns', '</NFe>') + '</NFe>');
          Gerador.wTexto(xProtNFe);
          Gerador.wGrupo('/nfeProc');
        end;
    
        XMLNFE.Free;
        XMLinfProt.Free;
        XMLinfProt2.Free;
        Result := (Gerador.ListaDeAlertas.Count = 0);
    
    //  end;
    end;////////////////////////////////////////////////////////////////////////////////
    //                                                                            //
    //              PCN - Projeto Cooperar NFe                                    //
    //                                                                            //
    //   Descrição: Classes para geração/leitura dos arquivos xml da NFe          //
    //                                                                            //
    //        site: www.projetocooperar.org                                       //
    //       email: [email protected]                                //
    //       forum: http://br.groups.yahoo.com/group/projeto_cooperar_nfe/        //
    //     projeto: http://code.google.com/p/projetocooperar/                     //
    //         svn: http://projetocooperar.googlecode.com/svn/trunk/              //
    //                                                                            //
    // Coordenação: © 2009 - Paulo Casagrande                                   //
    //                                                                            //
    //      Equipe: Vide o arquivo leiame.txt na pasta raiz do projeto            //
    //                                                                            //
    //      Versão: Vide o arquivo leiame.txt na pasta raiz do projeto            //
    //                                                                            //
    //     Licença: GNU Lesser General Public License (GNU LGPL)                  //
    //                                                                            //
    //              - Este programa é software livre; você pode redistribuí-lo    //
    //              e/ou modificá-lo sob os termos da Licença Pública Geral GNU,  //
    //              conforme publicada pela Free Software Foundation; tanto a     //
    //              versão 2 da Licença como (a seu critério) qualquer versão     //
    //              mais nova.                                                    //
    //                                                                            //
    //              - Este programa é distribuído na expectativa de ser útil,     //
    //              mas SEM QUALQUER GARANTIA; sem mesmo a garantia implícita de  //
    //              COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM       //
    //              PARTICULAR. Consulte a Licença Pública Geral GNU para obter   //
    //              mais detalhes. Você deve ter recebido uma cópia da Licença    //
    //              Pública Geral GNU junto com este programa; se não, escreva    //
    //              para a Free Software Foundation, Inc., 59 Temple Place,       //
    //              Suite 330, Boston, MA - 02111-1307, USA ou consulte a         //
    //              licença oficial em http://www.gnu.org/licenses/gpl.txt        //
    //                                                                            //
    //    Nota (1): - Esta  licença  não  concede  o  direito  de  uso  do nome   //
    //              "PCN  -  Projeto  Cooperar  NFe", não  podendo o mesmo ser    //
    //              utilizado sem previa autorização.                             //
    //                                                                            //
    //    Nota (2): - O uso integral (ou parcial) das units do projeto esta       //
    //              condicionado a manutenção deste cabeçalho junto ao código     //
    //                                                                            //
    ////////////////////////////////////////////////////////////////////////////////
    
    unit pcnRetConsSitNFe;
    
    interface uses
      SysUtils, Classes, pcnAuxiliar, pcnConversao, pcnLeitor, pcnProcNFe,
      pcnRetCancNFe, pcnRetEnvEventoNFe;
    
    type
    
      //////////////////////////////////////////////////////////////////////////////
      //                                                                          //
      //    E M   D E S E N V O L V I M E N T O   -   N Ã O   T E S T A D O       //
      //                                                                          //
      //////////////////////////////////////////////////////////////////////////////
    
      {eventos_juaumkiko}
      TRetEventoNFeCollection = class;
      TRetEventoNFeCollectionItem = class;
      TRetConsSitNFe = class;
    
      {eventos_juaumkiko}
      TRetEventoNFeCollection = class(TCollection)
      private
        function GetItem(Index: Integer): TRetEventoNFeCollectionItem;
        procedure SetItem(Index: Integer; Value: TRetEventoNFeCollectionItem);
      public
        constructor Create(AOwner: TPersistent);
        function Add: TRetEventoNFeCollectionItem;
        property Items[index: Integer]: TRetEventoNFeCollectionItem read GetItem write SetItem; default;
      end;
    
      {eventos_juaumkiko}
      TRetEventoNFeCollectionItem = class(TCollectionItem)
      private
        FRetEventoNFe: TRetEventoNFe;
      public
        constructor Create; reintroduce;
        destructor Destroy; override;
      published
        property RetEventoNFe: TRetEventoNFe read FRetEventoNFe write FRetEventoNFe;
      end;
    
      TRetConsSitNFe = class(TPersistent)
      private
        FLeitor: TLeitor;
        FtpAmb: TpcnTipoAmbiente;
        FverAplic: string;
        FcStat: Integer;
        FxMotivo: string;
        FcUF: integer;
        FchNFe: string;
        FprotNFe: TProcNFe;
        FretCancNFe: TRetCancNFe;
        FprocEventoNFe: TRetEventoNFeCollection;   {eventos_juaumkiko}
      public
        constructor Create;
        destructor Destroy; override;
        function LerXml: boolean;
      published
        property Leitor: TLeitor read FLeitor write FLeitor;
        property tpAmb: TpcnTipoAmbiente read FtpAmb write FtpAmb;
        property verAplic: string read FverAplic write FverAplic;
        property cStat: Integer read FcStat write FcStat;
        property xMotivo: string read FxMotivo write FxMotivo;
        property cUF: integer read FcUF write FcUF;
        property chNfe: string read FchNfe write FchNfe;
        property protNFe: TProcNFe read FprotNFe write FprotNFe;
        property retCancNFe: TRetCancNFe read FretCancNFe write FretCancNFe;
        property procEventoNFe: TRetEventoNFeCollection read FprocEventoNFe write FprocEventoNFe;
      end;
    
    implementation
    
    { TRetConsSitNFe }
    
    constructor TRetConsSitNFe.Create;
    begin
      FLeitor := TLeitor.Create;
      FprotNFe := TProcNFe.create;
      FretCancNFe := TRetCancNFe.create;
    end;
    
    destructor TRetConsSitNFe.Destroy;
    begin
      FLeitor.Free;
      FprotNFe.Free;
      FretCancNFe.Free;
      if Assigned(procEventoNFe) then
        procEventoNFe.Free;
      inherited;
    end;
    
    function TRetConsSitNFe.LerXml: boolean;
    var
      ok: boolean;
      i: integer;
    begin
      Result := False;
      try
        if leitor.rExtrai(1, 'retConsSitNFe') <> '' then
        begin
          (*ER03 *)FtpAmb     := StrToTpAmb(ok, leitor.rCampo(tcStr, 'tpAmb'));
          (*ER04 *)FverAplic  := leitor.rCampo(tcStr, 'verAplic');
          (*ER05 *)FcStat     := leitor.rCampo(tcInt, 'cStat');
          (*ER06 *)FxMotivo   := leitor.rCampo(tcStr, 'xMotivo');
          (*ER07 *)FcUF       := leitor.rCampo(tcInt, 'cUF');
          (*EP07a*)FchNFe     := leitor.rCampo(tcStr, 'chNFe');
          //if FcStat in  [100,101,150,151,155] then
          if FcStat in  [100,101, 110,150,151,155] then
          begin
            if ((Leitor.rExtrai(1, 'protNFe') <> '') or (Leitor.rExtrai(1, 'infProt') <> '')) then
            begin
              protNFe.tpAmb    := StrToTpAmb(ok, Leitor.rCampo(tcStr, 'tpAmb'));
              protNFe.verAplic := Leitor.rCampo(tcStr, 'verAplic');
              protNFe.chNFe    := Leitor.rCampo(tcStr, 'chNFe');
              protNFe.dhRecbto := Leitor.rCampo(tcDatHor, 'dhRecbto');
              protNFe.nProt    := Leitor.rCampo(tcStr, 'nProt');
              protNFe.digVal   := Leitor.rCampo(tcStr, 'digVal');
              protNFe.cStat    := Leitor.rCampo(tcInt, 'cStat');
              protNFe.xMotivo  := Leitor.rCampo(tcStr, 'xMotivo');
            end;
          end;
          if FcStat in [101,151,155] then
          begin
            if Leitor.rExtrai(1, 'infCanc') <> '' then
            begin
              retCancNFe.tpAmb    := StrToTpAmb(ok, Leitor.rCampo(tcStr, 'tpAmb'));
              retCancNFe.verAplic := Leitor.rCampo(tcStr, 'verAplic');
              retCancNFe.cStat    := Leitor.rCampo(tcInt, 'cStat');
              retCancNFe.xMotivo  := Leitor.rCampo(tcStr, 'xMotivo');
              retCancNFe.cUF      := Leitor.rCampo(tcInt, 'cUF');
              retCancNFe.chNFe    := Leitor.rCampo(tcStr, 'chNFe');
              retCancNFe.dhRecbto := Leitor.rCampo(tcDatHor, 'dhRecbto');
              retCancNFe.nProt    := Leitor.rCampo(tcStr, 'nProt');
            end;
          end;
          {eventos_juaumkiko}
          if Assigned(procEventoNFe) then
            procEventoNFe.Free;
          procEventoNFe := TRetEventoNFeCollection.Create(Self);
          i:=0;
          while Leitor.rExtrai(1, 'procEventoNFe', '', i + 1) <> '' do
          begin
            procEventoNFe.Add;
            procEventoNFe.Items[i].RetEventoNFe.Leitor.Arquivo := Leitor.Grupo;
            procEventoNFe.Items[i].RetEventoNFe.LerXml;
            inc(i);
          end;
          Result := True;
        end;
      except
        Result := False;
      end;
    end;
    
    { TRetEventoCollection }
    
    function TRetEventoNFeCollection.Add: TRetEventoNFeCollectionItem;
    begin
      Result := TRetEventoNFeCollectionItem(inherited Add);
      Result.create;
    end;
    
    constructor TRetEventoNFeCollection.Create(AOwner: TPersistent);
    begin
      inherited Create(TRetEventoNFeCollectionItem);
    end;
    
    function TRetEventoNFeCollection.GetItem(Index: Integer): TRetEventoNFeCollectionItem;
    begin
      Result := TRetEventoNFeCollectionItem(inherited GetItem(Index));
    end;
    
    procedure TRetEventoNFeCollection.SetItem(Index: Integer;
      Value: TRetEventoNFeCollectionItem);
    begin
      inherited SetItem(Index, Value);
    end;
    
    { TRetEventoCollectionItem }
    
    constructor TRetEventoNFeCollectionItem.Create;
    begin
      FRetEventoNFe := TRetEventoNFe.Create;
    end;
    
    destructor TRetEventoNFeCollectionItem.Destroy;
    begin
      FRetEventoNFe.Free;
      inherited;
    end;
    
    end.
    
    
  5. Olá,

      a princípio no fonte método "function TNFeW.GerarXml: boolean;"

      eu troque de 

      

      if nfe.procNFe.nProt <> '' then
       begin
         xProtNFe :=
           (**)'<protNFe versao="2.00">' +
         (******)'<infProt>'+
    

     

    para

    if nfe.procNFe.nProt <> '' then
       begin
         xProtNFe :=
           (**)'<protNFe versao="2.00">' +
         (******)'<infProt Id="'+ IIf( Pos('ID', nfe.procNFe.nProt) > 0, nfe.procNFe.nProt, 'ID'+ nfe.procNFe.nProt ) +'">'+
    

     

    E com isso esta atendendo.

     

    at+

  6. Sugestão de alteração:

       No método  TACBrBancoSantander.GerarRegistroTransacao400 próximo a linha 286, alterar :

    ...
    padL(Sacado.Avalista, 30, ' ' )+ ' '+ 'I'               +
    ..

    Por:

     

    ...
    IfThen(ACBrBoleto.Cedente.TipoInscricao = pJuridica,                         Space(30),
                             padL(Sacado.Avalista, 30, ' ' )
                            )+ ' '+ 'I'                                       +...

    Em anexo código com a alteração.

     

    Obrigado pela atenção.

    ACBrBancoSantander.pas

    ACBrBancoSantander.pas

  7. Olá, tbm fiz minha homologação com o Santander que inicialmente estava 100% mas foi o cliente começar a usar que os erros surgiram.

       Uma critica que estou tendo é referente ao "Sacado.Avalista", segundo a critica que recebi é que se o "TipoSacado" for pessoa Jurídica(TipoSacado = '02'),  o campo Sacado.Avalista deve ficar em branco.

       Nó código do ACbr não encontrei este tipo de tratamento, lá ele sempre escreve o Sacado avalista mesmo que seja '02'.

       Exe: ACBrBancoSantander.GerarRegistroTransacao400 +ou- linha 295 => padL(Sacado.Avalista, 30, ' ' )+ ' '+ 'I'.

     

    Até mais.

  8. Para simular, emita um cupom fiscal e em seguinda emita um não fiscal(recebimento por exemplo).

    Originalmente o ACBr iria gerar os arquivos na sequencia R04 e R07 depois R06 e R07.

    Quando passeio no validador ele criticou esta sequencia de registros, então por isso eu alterai para fazer com que o R07 não seja mais filho do R04 ou R06 e sim do nodo principal.

    at+

  9. Olá,

    não estou tendo retorno do homologador referente a este caso.

    Mas como vamos fazer nossa homologação amanhã, eu aproveito para tirar este dúvida.

    Eu acredito que o critério adotado para solicitar o arquivo na ordenação (R01, R02, R03, R04, R05, R06, R07), deva se ao fato de que o R07 tenha os campos chave que existam nos registros R04 e R06.

    At+

  10. Olá,

    Estou com um pequeno problema ao tratar a aliquota no "DepoisVendeItem" quando o RFD estiver ativo.

    Eu chamo a venda do item, após a impressão do item na impressora, dentro do método "TACBrECF.VendeItem" existe um tratamento para o RFD:

    ...
    
      if RFDAtivo then
    
      begin
    
         case AliquotaICMS[1] of
    
           'I' : AliquotaICMS := 'I1' ;
    
           'N' : AliquotaICMS := 'N1' ;
    
           'F' : AliquotaICMS := 'F1' ;
    
         else
    
            if Aliquota <> nil then
    
               AliquotaICMS := IntToStrZero(Aliquota.Sequencia,2) + Aliquota.Tipo +
    
                               IntToStrZero(Round(Aliquota.Aliquota*100),4)
    
            else
    
               AliquotaICMS := '' ;
    
         end ;
    
       ...
    
        end ;
    
    
       if Assigned( FOnDepoisVendeItem ) then
    
          FOnDepoisVendeItem( Codigo, Descricao, AliquotaICMS, Qtd, ValorUnitario, ValorDescontoAcrescimo, Unidade, TipoDescontoAcrescimo, DescontoAcrescimo);
    
       ...

    Este tratamento esta alterado o valor do parâmetro "AliquotaICMS", concatenando o percentual da aliquota, conforme pode ser visto no "else" do "case".

    Isto esta correto?

    É que quando vou tratar o evento "OnDepoisVendeItem", na minha opinião a aliquota não condiz com o valor correto já que foi alterado.

    Alguém já passou por algo similar?

    Ou esta usando o RFD?

    Obrigado pela atenção.

  11. Olá,

    Sim o atributo "Id" não é obrigatório, tanto que não gera critica ao aplicar o schema. Mas tivemos que revisar este regra para atender a um outro sistema que efetuamos integração.

    A alteração foi no método (function TNFeW.GerarXml: boolean;);

    Onde adicionei o atributo a tag.

    De:

    (******)''+
    
    ...
    
    (******)''+
    
    ...
    
    
    Para
    (******)''+
    E no método (function TProcNFe.GerarXML: boolean;): Onde tbm trato a tag, só neste caso tive que criar uma variável local para obter o valor temporariamente. De:
    (******)''+// + RetornarConteudoEntre(XMLinfProt.text, '') +
    Para:
    nProtLoc :String;
    
    ...
    
    nProtLoc := RetornarConteudoEntre(XMLinfProt2.text, '', '');
    
    // Alterado por Italo em 28/09/2012
    
    xProtNFe :=
    
    '' +
    
    (******)''+// + RetornarConteudoEntre(XMLinfProt.text, '') +
    
    ....
    
    (******)''+
    
    

    Até mais.

  12. Olá..

    Fomos informados por um cliente que a tag infProt estava sendo gerada sem o atributo "Id", e isso estava gerando problemas de integração com outras ferramentas.

    Avaliando os fontes do ACBr foi possível constatar que os fontes "acbr2\Fontes\PCN2\pcnNFeW.pas" e "acbr2\Fontes\PCN2\pcnProcNFe.pas" não tratam este atributo.

    Nestes tópicos acho que já existe alguma relação com este assunto:

    viewtopic.php?f=6&t=5558&p=28652&hilit=infProt+id#p28652

    viewtopic.php?f=6&t=4935&p=24424&hilit=infProt+id#p24424

    viewtopic.php?f=6&t=2256&p=10347&hilit=infProt+id#p10347

    Segue e anexo alteração nos fontes para avaliação e possível revisão.

    Obrigado pela atenção.

    pcnNFeW.pas

    pcnProcNFe.pas

  13. Darlana

    Eu trato a nota Denegada(cStat 301 ou 302) tanto no retorno do envio(TACBrNFe.WebServices.Envia(xx)) do XML quanto no retorno da Consulta(TACBrNFe.Consultar).

    O que verifique é que na minha opinião o método TRetConsSitNFe.LerXml não estava tratando corretamente o retorno, quando a nota estava denegada o método não carregava todos os dados (protocolo,...) que vieram no retorno. Por isso alterei o código e com esta alteração quando a nota é denegada no envio(por exemplo) eu tenho o protocolo, e posso guardar ele.

    Talvez a forma como implementamos o tratamento do retorno pode estar incorreto, e por isso que o erro pode não estar ocorrendo com outro usuário.

    at+

×
×
  • 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.