Jump to content

dev botao

SPED Contábil


WilkinsonLM
  • Este tópico foi criado há 4463 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Boa tarde,

Foi disponibilizada a versão 2.2.4 do validador de escrituração contábil. (http://www.receita.fazenda.gov.br/Sped/ ... aforma.htm), e com isso, está dando erro nos contadores de registros (vide anexo).

Alguem ai teve o mesmo erro?

O estranho é que antes validava tudo certinho, e agora, ele trancou :?

Ola, Wilkinson, verifique no TXT a quantidade de linhas, e confira se no TXT ta certo ou é um bug nessa nova versão.

--
Isaque Pinheiro
Aracruz/ES - Brasil
___________________________________________________________________________
Site Oficial: www.isaquepinheiro.com.br 
Youtube: youtube.com/isaquepinheirooficialbr
Facebook: facebook.com.br/isaquepinheirooficialbr
Instagram: instagram.com/isaquepinheirooficialbr
Linkdin: https://www.linkedin.com/in/isaquepinheirooficialbr

Conheça o Projeto ORMBr Framework for Delphi - https://www.ormbr.com.br

 

Link to comment
Share on other sites

Boa tarde,

Foi disponibilizada a versão 2.2.4 do validador de escrituração contábil. (http://www.receita.fazenda.gov.br/Sped/ ... aforma.htm), e com isso, está dando erro nos contadores de registros (vide anexo).

Alguem ai teve o mesmo erro?

O estranho é que antes validava tudo certinho, e agora, ele trancou :?

Ola, Wilkinson, verifique no TXT a quantidade de linhas, e confira se no TXT ta certo ou é um bug nessa nova versão.

Bom saber que o SPED Contabil esta em produção, vc usa ele no seu sistema gerencial ou em um sistema contabil ?

--
Isaque Pinheiro
Aracruz/ES - Brasil
___________________________________________________________________________
Site Oficial: www.isaquepinheiro.com.br 
Youtube: youtube.com/isaquepinheirooficialbr
Facebook: facebook.com.br/isaquepinheirooficialbr
Instagram: instagram.com/isaquepinheirooficialbr
Linkdin: https://www.linkedin.com/in/isaquepinheirooficialbr

Conheça o Projeto ORMBr Framework for Delphi - https://www.ormbr.com.br

 

Link to comment
Share on other sites

Boa tarde,

Bom saber que o SPED Contabil esta em produção, vc usa ele no seu sistema gerencial ou em um sistema contabil ?

Dei uma olhada no código fonte, e me parece tudo 100%, pode ser BUG nesse novo validador, como te falei, copie todos os registros J150 para um novo TXT, e olhe no Notepad quantas linhas tem, pelo que vi o ACBrSPED achou 40 e o validador só 20, se tiver 40 então o bug é no validador.

Tenha atenção, porque o registro J150 é filho do J005, então irá ficar assim no TXT:

J005

J100

J150

J005

J100

J150

Pelo que vi na imagem os valores são sempre o dobro, parece que a função esta sendo chamada duas vezes, mas no código do componente só chama uma vez, que é do método WriteRegistroJ005.

Abraço

--
Isaque Pinheiro
Aracruz/ES - Brasil
___________________________________________________________________________
Site Oficial: www.isaquepinheiro.com.br 
Youtube: youtube.com/isaquepinheirooficialbr
Facebook: facebook.com.br/isaquepinheirooficialbr
Instagram: instagram.com/isaquepinheirooficialbr
Linkdin: https://www.linkedin.com/in/isaquepinheirooficialbr

Conheça o Projeto ORMBr Framework for Delphi - https://www.ormbr.com.br

 

Link to comment
Share on other sites

Boa tarde,

Foi disponibilizada a versão 2.2.4 do validador de escrituração contábil. (http://www.receita.fazenda.gov.br/Sped/ ... aforma.htm), e com isso, está dando erro nos contadores de registros (vide anexo).

Alguem ai teve o mesmo erro?

O estranho é que antes validava tudo certinho, e agora, ele trancou :?

Ola, Wilkinson, verifique no TXT a quantidade de linhas, e confira se no TXT ta certo ou é um bug nessa nova versão.

Bom saber que o SPED Contabil esta em produção, vc usa ele no seu sistema gerencial ou em um sistema contabil ?

Utilizo ele no modulo contábil do nosso sistema gerencial.

E pelo o que eu conferi, é na geração do arquivo TXT que está dando a divergência. Conferi os registros J100 e J150 e realmente o valor está o dobro do esperado...

Abraços.

Link to comment
Share on other sites

          // Registro J150: Demonstração Do Resultado Do Exercício

          SQLDRE.Close;

          SQLDRE.ParamByName('EMP').AsString  := DMDados.SQLEmpresaCODIGO_EMP.AsString;

          SQLDRE.ParamByName('MES').AsInteger := MonthOf(DT_INI);

          SQLDRE.ParamByName('ANO').AsInteger := YearOf(DT_INI);

          SQLDRE.Open;

          SQLDRE.First;

          FrmAguarde.AguardeGauge(SQLDRE.RecordCount);


          while not(SQLDRE.Eof) do

          begin

            with RegistroJ150.New do

            begin

              COD_AGL := SQLDRECONTA_DRA.AsString;

              NIVEL_AGL := '1';

              DESCR_COD_AGL := SQLDREDESCRICAO_DRA.AsString;

              if (SQLDREVALOR_DRA.AsFloat > 0) then

              begin

                VL_CTA := SQLDREVALOR_DRA.AsFloat;

                if (Trim(SQLDREFORMULA_DRA.AsString) <> '') then

                  IND_VL := 'P'

                else

                  IND_VL := 'R';

              end

              else

              begin

                VL_CTA := SQLDREVALOR_DRA.AsFloat * -1;

                if (Trim(SQLDREFORMULA_DRA.AsString) <> '') then

                  IND_VL := 'N'

                else

                  IND_VL := 'D';

              end;

            end;

            SQLDRE.Next;

            FrmAguarde.AguardeGauge(SQLDRE.RecNo);

          end;

Essa é a parte que eu alimento as informações do registro J150...

Link to comment
Share on other sites

          // Registro J150: Demonstração Do Resultado Do Exercício
SQLDRE.Close;
SQLDRE.ParamByName('EMP').AsString := DMDados.SQLEmpresaCODIGO_EMP.AsString;
SQLDRE.ParamByName('MES').AsInteger := MonthOf(DT_INI);
SQLDRE.ParamByName('ANO').AsInteger := YearOf(DT_INI);
SQLDRE.Open;
SQLDRE.First;
FrmAguarde.AguardeGauge(SQLDRE.RecordCount);

while not(SQLDRE.Eof) do
begin
with RegistroJ150.New do
begin
COD_AGL := SQLDRECONTA_DRA.AsString;
NIVEL_AGL := '1';
DESCR_COD_AGL := SQLDREDESCRICAO_DRA.AsString;
if (SQLDREVALOR_DRA.AsFloat > 0) then
begin
VL_CTA := SQLDREVALOR_DRA.AsFloat;
if (Trim(SQLDREFORMULA_DRA.AsString) '') then
IND_VL := 'P'
else
IND_VL := 'R';
end
else
begin
VL_CTA := SQLDREVALOR_DRA.AsFloat * -1;
if (Trim(SQLDREFORMULA_DRA.AsString) '') then
IND_VL := 'N'
else
IND_VL := 'D';
end;
end;
SQLDRE.Next;
FrmAguarde.AguardeGauge(SQLDRE.RecNo);
end;[/code] Essa é a parte que eu alimento as informações do registro J150... o Erro pode estar ai, pois como ele é filho do J005, tem que ser alimentado de dentro do J005 assim:
[code]
with RegistroJ005.New do begin

while not(SQLDRE.Eof) do
begin
with RegistroJ150.New do
begin
COD_AGL := SQLDRECONTA_DRA.AsString;
NIVEL_AGL := '1';
DESCR_COD_AGL := SQLDREDESCRICAO_DRA.AsString;
if (SQLDREVALOR_DRA.AsFloat > 0) then
begin
VL_CTA := SQLDREVALOR_DRA.AsFloat;
if (Trim(SQLDREFORMULA_DRA.AsString) '') then
IND_VL := 'P'
else
IND_VL := 'R';
end
else
begin
VL_CTA := SQLDREVALOR_DRA.AsFloat * -1;
if (Trim(SQLDREFORMULA_DRA.AsString) '') then
IND_VL := 'N'
else
IND_VL := 'D';
end;
end;
SQLDRE.Next;
FrmAguarde.AguardeGauge(SQLDRE.RecNo);
end;

end;

Verifique no seu código que deve deve estar chamado os métodos também WriteRegistroJ150, ai será duplicados mesmo, pois o método WriteRegistroJ005, que é disparado quando vc manda gerar o TXT, internamente elejá chama WriteRegistroJ150.

Abraço

--
Isaque Pinheiro
Aracruz/ES - Brasil
___________________________________________________________________________
Site Oficial: www.isaquepinheiro.com.br 
Youtube: youtube.com/isaquepinheirooficialbr
Facebook: facebook.com.br/isaquepinheirooficialbr
Instagram: instagram.com/isaquepinheirooficialbr
Linkdin: https://www.linkedin.com/in/isaquepinheirooficialbr

Conheça o Projeto ORMBr Framework for Delphi - https://www.ormbr.com.br

 

Link to comment
Share on other sites

    for intContador := intInicial to MonthOf(edtDataFin.AsDate) do

    begin

      // Registro J005: Demonstrações Contábeis

      with RegistroJ005.New do

      begin

        DT_INI := StrToDate('01/' + FormatFloat('00', intContador) + '/' + IntToStr(YearOf(StrToDate(edtDataFin.Text))));

        DT_FIN := StrToDate(funUltimoDiaMes(DT_INI));

        ID_DEM  := 1;

        FrmAguarde.lblCentralizado.Caption := 'Bloco J, Registro J100';

        FrmAguarde.lblCaption.Caption      := 'Buscando Balanço Patrimonial, Período : ' + FormatDateTime('mm/yyyy', DT_FIN);

        FrmAguarde.Refresh;

        proBuscarSaldosPlanoContas(DT_INI, DT_FIN);

        FrmAguarde.lblCentralizado.Caption := 'Bloco J, Registro J100';

        FrmAguarde.lblCaption.Caption      := 'Balanço Patrimonial, Período : ' + FormatDateTime('mm/yyyy', DT_FIN);

        FrmAguarde.Refresh;

        // Registro J100: Balanço Patrimonial

        if (CDSContas.Active) then

        begin

          CDSContas.First;

          FrmAguarde.AguardeGauge(0, CDSContas.RecordCount);

          while not(CDSContas.Eof) do

          begin

            with RegistroJ100.New do

            begin

              COD_AGL       := CDSContas.FieldByName('CODIGO').AsString;

              NIVEL_AGL     := CDSContas.FieldByName('MAX').AsString;

              IND_GRP_BAL   := CDSContas.FieldByName('GRAU1').AsString;

              DESCR_COD_AGL := CDSContas.FieldByName('NOME').AsString;

              if (CDSContas.FieldByName('VALOR').AsFloat >= 0) then

              begin

                VL_CTA     := CDSContas.FieldByName('VALOR').AsFloat;

                IND_DC_BAL := 'C';

              end

              else if (CDSContas.FieldByName('VALOR').AsFloat < 0) then

              begin

                VL_CTA     := CDSContas.FieldByName('VALOR').AsFloat * -1;

                IND_DC_BAL := 'D';

              end;

            end;

            CDSContas.Next;

            FrmAguarde.AguardeGauge(CDSContas.RecNo);            

          end;

          FrmAguarde.lblCentralizado.Caption := 'Bloco J, Registro J150';

          FrmAguarde.lblCaption.Caption      := 'DRE, Período : ' + FormatDateTime('mm/yyyy', DT_FIN);

          // Registro J150: Demonstração Do Resultado Do Exercício

          SQLDRE.Close;

          SQLDRE.ParamByName('EMP').AsString  := DMDados.SQLEmpresaCODIGO_EMP.AsString;

          SQLDRE.ParamByName('MES').AsInteger := MonthOf(DT_INI);

          SQLDRE.ParamByName('ANO').AsInteger := YearOf(DT_INI);

          SQLDRE.Open;

          SQLDRE.First;

          FrmAguarde.AguardeGauge(SQLDRE.RecordCount);


          while not(SQLDRE.Eof) do

          begin

            with RegistroJ150.New do

            begin

              COD_AGL := SQLDRECONTA_DRA.AsString;

              NIVEL_AGL := '1';

              DESCR_COD_AGL := SQLDREDESCRICAO_DRA.AsString;

              if (SQLDREVALOR_DRA.AsFloat > 0) then

              begin

                VL_CTA := SQLDREVALOR_DRA.AsFloat;

                if (Trim(SQLDREFORMULA_DRA.AsString) <> '') then

                  IND_VL := 'P'

                else

                  IND_VL := 'R';

              end

              else

              begin

                VL_CTA := SQLDREVALOR_DRA.AsFloat * -1;

                if (Trim(SQLDREFORMULA_DRA.AsString) <> '') then

                  IND_VL := 'N'

                else

                  IND_VL := 'D';

              end;

            end;

            SQLDRE.Next;

            FrmAguarde.AguardeGauge(SQLDRE.RecNo);

          end;

        end;

        DT_INI := StrToDate('01/' + FormatFloat('00', MonthOf(StrToDate(edtDataIni.Text))) + '/' + IntToStr(YearOf(StrToDate(edtDataFin.Text))));

        FrmAguarde.AguardeGauge2(intContador);

      end;

    end;

Ele já está dentro, eu só não tinha postado aqui o resto do código. Agora esse é o código completo.

Preciso limpar o componente a cada arquivo que eu tentar gerar?

Link to comment
Share on other sites

  • Este tópico foi criado há 4463 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.