Bugfix for database replication topology in Organization.EnableEconomy()
This commit is contained in:
@@ -197,12 +197,18 @@ namespace Activizr.Logic.Structure
|
||||
FinancialAccount.Create(this.Identity, "Taxes Due", FinancialAccountType.Debt, 0);
|
||||
FinancialAccounts[OrganizationFinancialAccountType.DebtsVat] =
|
||||
FinancialAccount.Create(this.Identity, "Outbound Value Added Tax", FinancialAccountType.Debt, 0);
|
||||
FinancialAccounts[OrganizationFinancialAccountType.IncomeGeneral] =
|
||||
|
||||
FinancialAccount incomeGeneral =
|
||||
FinancialAccount.Create(this.Identity, "Income", FinancialAccountType.Income, 0);
|
||||
|
||||
// We need to store this in code because of database lag replication issues when creating children -
|
||||
// we can't use assume that it's available for reading yet.
|
||||
|
||||
FinancialAccounts[OrganizationFinancialAccountType.IncomeGeneral] = incomeGeneral;
|
||||
FinancialAccounts[OrganizationFinancialAccountType.IncomeDonations] =
|
||||
FinancialAccount.Create(this.Identity, "Donations", FinancialAccountType.Income, FinancialAccounts.IncomeGeneral.Identity);
|
||||
FinancialAccount.Create(this.Identity, "Donations", FinancialAccountType.Income, incomeGeneral.Identity);
|
||||
FinancialAccounts[OrganizationFinancialAccountType.IncomeSales] =
|
||||
FinancialAccount.Create(this.Identity, "Sales", FinancialAccountType.Income, FinancialAccounts.IncomeGeneral.Identity);
|
||||
FinancialAccount.Create(this.Identity, "Sales", FinancialAccountType.Income, incomeGeneral.Identity);
|
||||
|
||||
// Then, create various cost accounts that are probably needed, or that could be used as a starting point
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@ public partial class Pages_v5_Init_Default : System.Web.UI.Page
|
||||
rootGeographyId, true,
|
||||
true, 0).EnableEconomy();
|
||||
|
||||
// Create the
|
||||
// TEMP - delete this later
|
||||
|
||||
Activizr.Logic.Structure.Organization.Create(0, "Europirate Academy", "Europirate Academy", "Pirate Academy", "pirateacademy.eu", "Academy",
|
||||
rootGeographyId, true,
|
||||
|
||||
Reference in New Issue
Block a user