diff --git a/src/FiscalBr.Common/Sped/LerCamposSped.cs b/src/FiscalBr.Common/Sped/LerCamposSped.cs index 2446f75..40dd585 100644 --- a/src/FiscalBr.Common/Sped/LerCamposSped.cs +++ b/src/FiscalBr.Common/Sped/LerCamposSped.cs @@ -8,7 +8,7 @@ namespace FiscalBr.Common.Sped { public static class LerCamposSped { - public static object LerCampos(this string line, string file = Constantes.ArquivoDigital.Sped.EFDFiscal, int codVersao = 0) + public static object LerCampos(this string line, string file = "EFDFiscal", int codVersao = 0) { line = line.TrimStart().Substring(1); diff --git a/src/FiscalBr.EFDContribuicoes/ArquivoEFDContribuicoes.cs b/src/FiscalBr.EFDContribuicoes/ArquivoEFDContribuicoes.cs index 5d53897..e2eef2b 100644 --- a/src/FiscalBr.EFDContribuicoes/ArquivoEFDContribuicoes.cs +++ b/src/FiscalBr.EFDContribuicoes/ArquivoEFDContribuicoes.cs @@ -32,7 +32,7 @@ public override void Ler(string path, Encoding encoding = null, int codVersaoLay { if (leituraConcluida == false) { - var registro = (RegistroSped)LerCamposSped.LerCampos(linha, Constantes.ArquivoDigital.Sped.EFDContribuicoes, codVersaoLayout); + var registro = (RegistroSped)LerCamposSped.LerCampos(linha, "EFDContribuicoes", codVersaoLayout); if (registro.Reg == "9999") leituraConcluida = true; diff --git a/src/FiscalBr.EFDFiscal/ArquivoEFDFiscal.cs b/src/FiscalBr.EFDFiscal/ArquivoEFDFiscal.cs index acd369d..e41151e 100644 --- a/src/FiscalBr.EFDFiscal/ArquivoEFDFiscal.cs +++ b/src/FiscalBr.EFDFiscal/ArquivoEFDFiscal.cs @@ -36,7 +36,7 @@ public override void Ler(string[] source) { if (leituraConcluida == false) { - var registro = (RegistroSped)LerCamposSped.LerCampos(linha, Constantes.ArquivoDigital.Sped.EFDFiscal, codVersaoLayout); + var registro = (RegistroSped)LerCamposSped.LerCampos(linha, "EFDFiscal", codVersaoLayout); if (registro.Reg == "9999") leituraConcluida = true; @@ -88,7 +88,7 @@ public override void Ler(string path, Encoding encoding = null, int codVersaoLay { if (leituraConcluida == false) { - var registro = (RegistroSped)LerCamposSped.LerCampos(linha, Constantes.ArquivoDigital.Sped.EFDFiscal, codVersaoLayout); + var registro = (RegistroSped)LerCamposSped.LerCampos(linha, "EFDFiscal", codVersaoLayout); if (registro.Reg == "9999") leituraConcluida = true; diff --git a/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1320Test.cs b/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1320Test.cs index 6d907da..9e01ecf 100644 --- a/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1320Test.cs +++ b/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1320Test.cs @@ -14,7 +14,7 @@ public void Ler_Registro_1320_EFDFiscal() { string linha = "|1320|1|1234567890|Motivo 1|Interventor 1|51077662000109|00695196090|100,13|55,20|10|40|"; - var registro = (FiscalBr.EFDFiscal.Bloco1.Registro1320)LerCamposSped.LerCampos(linha, Constantes.ArquivoDigital.Sped.EFDFiscal, 0); + var registro = (FiscalBr.EFDFiscal.Bloco1.Registro1320)LerCamposSped.LerCampos(linha, "EFDFiscal", 0); Assert.Equal("1320", registro.Reg); Assert.Equal(1, registro.NumBico); diff --git a/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1391Test.cs b/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1391Test.cs index a91c9eb..f217c75 100644 --- a/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1391Test.cs +++ b/tests/FiscalBr.Test/Sped/Bloco1/Bloco1Registro1391Test.cs @@ -14,7 +14,7 @@ public void Ler_Registro_1391_EFDFiscal() { string linha = "|1391|01012023|123,41|123,42|123,43|123,44|123,45|123,46|123,47|123,48|123,49|123,40|123,41|123,42|123,43|123,44|Observações|COD_ITEM|01|123,45|"; - var registro = (FiscalBr.EFDFiscal.Bloco1.Registro1391)LerCamposSped.LerCampos(linha, Constantes.ArquivoDigital.Sped.EFDFiscal, 0); + var registro = (FiscalBr.EFDFiscal.Bloco1.Registro1391)LerCamposSped.LerCampos(linha, "EFDFiscal", 0); Assert.Equal("1391", registro.Reg); Assert.Equal(new DateTime(2023, 01, 01), registro.DtRegistro); diff --git a/tests/FiscalBr.Test/Sped/SpedLeituraTest.cs b/tests/FiscalBr.Test/Sped/SpedLeituraTest.cs index a37c143..ca1210f 100644 --- a/tests/FiscalBr.Test/Sped/SpedLeituraTest.cs +++ b/tests/FiscalBr.Test/Sped/SpedLeituraTest.cs @@ -232,7 +232,7 @@ public void Teste_Leitura_Quantidade_Propriedades_EFDFiscal_C500_V2() var bloco = registro.Substring(0, 1); - var toInstantiate = $"FiscalBr.{Constantes.ArquivoDigital.Sped.EFDFiscal}.Bloco{bloco}+Registro{registro}, FiscalBr.{Constantes.ArquivoDigital.Sped.EFDFiscal}"; + var toInstantiate = $"FiscalBr.{"EFDFiscal"}.Bloco{bloco}+Registro{registro}, FiscalBr.{"EFDFiscal"}"; var objectType = Type.GetType(toInstantiate);