Ejemplo n.º 1
0
        public void EscreverRegistro0000()
        {
            // SPED Fiscal
            var reg0000 = new SpedFiscal.Bloco0.Registro0000
            {
                CodVer = 1,
                CodFin = IndCodFinalidadeArquivo.RemessaArquivoOriginal,
                DtIni  = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1),
                DtFin  = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).GetLastDayOfCurrentMonth(),
                Nome   = "EMPRESA ABC LTDA - ME",
                Cnpj   = "01.234.567/0008-99",
                Uf     = "GO",
                Ie     = "0000000000",
                CodMun = "5204508", // Caldas Novas
                Im     = "",
                // Suframa
                IndPerfil = IndPerfilArquivo.A,
                IndAtiv   = IndTipoAtividade.Outros
            };

            var initialDate = reg0000.DtIni.ToNormalizedDDMMYYYYString();
            var finalDate   = reg0000.DtFin.ToNormalizedDDMMYYYYString();

            var expectedResult = $"|0000|001|0|{initialDate}|{finalDate}|EMPRESA ABC LTDA - ME|01.234.567/000||GO|0000000000|5204508|||A|1|";
            var actualResult   = reg0000.EscreverCampos(true);

            Assert.AreEqual(expectedResult, actualResult);
        }
Ejemplo n.º 2
0
        public void EscreverBloco0()
        {
            // SPED Fiscal
            var reg0000 = new SpedFiscal.Bloco0.Registro0000();

            reg0000.Cnpj = "01.234.567/0008-99";

            var result = reg0000.EscreverCampos(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1));
        }
Ejemplo n.º 3
0
        public void EscreverBloco0()
        {
            // SPED Fiscal
            var reg0000 = new SpedFiscal.Bloco0.Registro0000();

            reg0000.CodVer = 1;
            reg0000.CodFin = IndCodFinalidadeArquivo.RemessaArquivoOriginal;
            reg0000.DtIni  = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            reg0000.DtFin  = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ObterUltimoDiaMesAtual();
            reg0000.Nome   = "EMPRESA ABC LTDA - ME";
            reg0000.Cnpj   = "01.234.567/0008-99";
            reg0000.Uf     = "GO";
            // I.E.
            reg0000.CodMun = "5204508"; // Caldas Novas
            reg0000.Im     = string.Empty;
            // Suframa
            reg0000.IndPerfil = IndPerfilArquivo.A;
            reg0000.IndAtiv   = IndTipoAtividade.Outros;

            string errosEncontrados = string.Empty;

            var result = reg0000.EscreverCampos(out errosEncontrados);
        }