コード例 #1
0
        internal AccountsChartMasterData(AccountsChart accountsChart, JsonObject fields)
        {
            Assertion.AssertObject(accountsChart, "accountsChart");
            Assertion.AssertObject(fields, "fields");

            this.AccountsChart = accountsChart;

            Load(fields);
        }
コード例 #2
0
        public Account GetParent()
        {
            if (this.Level == 1)
            {
                return(Account.Empty);
            }

            var accountNumberSeparator = this.AccountsChart.MasterData.AccountNumberSeparator;

            var parentAccountNumber = this.Number.Substring(0, this.Number.LastIndexOf(accountNumberSeparator));

            return(AccountsChart.GetAccount(parentAccountNumber));
        }
コード例 #3
0
 static public void Preload()
 {
     try {
         EmpiriaLog.Info($"Application preloading starts at {DateTime.Now}.");
         StandardAccount.Preload();
         AccountsChart.Preload();
         SubsidiaryLedger.Preload();
         SubsidiaryAccount.Preload();
         EmpiriaLog.Info($"Application preloading ends at {DateTime.Now}.");
     } catch (Exception e) {
         EmpiriaLog.Error(e);
     }
 }
コード例 #4
0
        public StandardAccount GetParent()
        {
            if (!this.HasParent)
            {
                return(StandardAccount.Empty);
            }

            var accountNumberSeparator = this.AccountsChart.MasterData.AccountNumberSeparator;

            var parentAccountNumber = this.Number.Substring(0, this.Number.LastIndexOf(accountNumberSeparator));

            var parent = AccountsChart.GetAccount(parentAccountNumber);

            return(StandardAccount.Parse(parent.StandardAccountId));
        }
コード例 #5
0
        internal AccountsChartMasterData(AccountsChart accountsChart)
        {
            Assertion.AssertObject(accountsChart, "accountsChart");

            this.AccountsChart = accountsChart;
        }