private void ProcessarDetalhesLancamentosContabeis(RegistroI200 regI200)
        {
            this.UpdateStatusAsynchronousExecution("Processando detalhes de lançamento contábil");

            IEnumerable <RegistroI250> registrosI250 =
                LancamentosService.GetRegistrosI250(regI200.NUM_LCTO);

            foreach (RegistroI250 regI250 in registrosI250)
            {
                this.UpdateStatusAsynchronousExecution("Gerando Registro I250");
                DadosArquivoContabilService.PersistirRegistro(regI250);

                this.ProcessarHistoricoPadrao(regI250.COD_HIST_PAD);
            }
        }
        private void ProcessarLancamentosPeriodo()
        {
            if (!LancamentosService.EfetuarProcessamentoLancamentosContabeis())
            {
                return;
            }

            this.UpdateStatusAsynchronousExecution("Iniciando processamento de lançamentos contábeis");

            IEnumerable <RegistroI200> registrosI200 =
                LancamentosService.GetRegistrosI200();

            foreach (RegistroI200 regI200 in registrosI200)
            {
                this.UpdateStatusAsynchronousExecution("Gerando Registro I200");
                DadosArquivoContabilService.PersistirRegistro(regI200);

                this.ProcessarDetalhesLancamentosContabeis(regI200);
            }
        }
Exemple #3
0
        public ActionResult <JObject> incluirLancamento([FromBody] JObject dados)
        {
            LancamentosService lancamentosService = new LancamentosService(indiceController);

            Tabela registros = lancamentosService.calcular(dados);

            Console.WriteLine("##############################################");
            Console.WriteLine(registros.ToString());

            if (registros != null)
            {
                Totais totais = lancamentosService.calcularTotais(registros);
                if (totais != null)
                {
                    Retorno retorno = new Retorno("contrato infos", registros, totais);
                    return(JObject.Parse(
                               JsonConvert.SerializeObject(retorno)
                               ));
                }
            }
            return(JObject.Parse("{'success': false, 'msg':'Algo de errado aconteceu'}"));
        }
        private void ProcessarLancamentos()
        {
            this.UpdateStatusAsynchronousExecution("Iniciando processamento dos lançamentos contábeis");

            this.UpdateStatusAsynchronousExecution("Gerando Registro I001");
            RegistroI001 regI001 = LancamentosService.GetRegistroI001();

            DadosArquivoContabilService.PersistirRegistro(regI001);

            this.UpdateStatusAsynchronousExecution("Gerando Registro I010");
            RegistroI010 regI010 = LancamentosService.GetRegistroI010();

            DadosArquivoContabilService.PersistirRegistro(regI010);

            this.ProcessarPlanoContas();
            this.ProcessarSaldosPeriodicos(); // método com problema decimal
            this.ProcessarLancamentosPeriodo();
            this.ProcessarBalancetesPeriodo();

            this.UpdateStatusAsynchronousExecution("Gerando Registro I990");
            RegistroI990 regI990 = DadosArquivoContabilService.GetRegistroI990();

            DadosArquivoContabilService.PersistirRegistro(regI990);
        }