internal AccountsChartMasterData(AccountsChart accountsChart, JsonObject fields) { Assertion.AssertObject(accountsChart, "accountsChart"); Assertion.AssertObject(fields, "fields"); this.AccountsChart = accountsChart; Load(fields); }
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)); }
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); } }
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)); }
internal AccountsChartMasterData(AccountsChart accountsChart) { Assertion.AssertObject(accountsChart, "accountsChart"); this.AccountsChart = accountsChart; }