Ejemplo n.º 1
0
        public void CalculatePeriodAccountsBalance(FiscalYear period)
        {
            if (period.IsPostClosingEntriesLedger)
            {
                return;
            }

            period.PreparePeriodAccountBalance(organization.ChartOfAccount.GetAccountsList());
            period.ResetPeriodAccountsBalance();
            this.UpdatePeriodBalances(period);
            period.UpdateProfit();
            this.SaveChanges();
        }
Ejemplo n.º 2
0
        public void CalculateOpeningEntries(FiscalYear period)
        {
            period.PreparePeriodAccountBalance(organization.ChartOfAccount.GetAccountsList());
            period.ClearOpeningAccountsBalance();

            erpNodeDBContext.SaveChanges();

            if (period.PreviousFiscal == null)
            {
                this.CopyOpeningBalanceToFirstPeriod(period);
            }
            else
            {
                period.CopyAccountsBalanceFromPrevius();
            }

            period.OpeningAccountsCalculateDateTime = DateTime.Today;
            erpNodeDBContext.SaveChanges();
        }