diff --git a/Logic/Financial/OrganizationFinancialAccounts.cs b/Logic/Financial/OrganizationFinancialAccounts.cs index b4afe813..13cb7d46 100644 --- a/Logic/Financial/OrganizationFinancialAccounts.cs +++ b/Logic/Financial/OrganizationFinancialAccounts.cs @@ -218,7 +218,7 @@ namespace Swarmops.Logic.Financial } } - public FinancialAccounts ExpensableAccounts + public FinancialAccounts ExpensableBudgets { // TODO: This needs to return a tree, not a flat list. @@ -234,7 +234,7 @@ namespace Swarmops.Logic.Financial foreach (FinancialAccount account in costAccounts) { - if (account.Identity != yearlyResultId) + if (account.Identity != yearlyResultId && account.Dimension == 1 && account.Expensable) { result.Add(account); } diff --git a/Site5/Automation/Json-ExpensableBudgetsTree.aspx.cs b/Site5/Automation/Json-ExpensableBudgetsTree.aspx.cs index dbb8cb9c..fcbdf8cb 100644 --- a/Site5/Automation/Json-ExpensableBudgetsTree.aspx.cs +++ b/Site5/Automation/Json-ExpensableBudgetsTree.aspx.cs @@ -20,7 +20,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial // Is this stuff in cache already? - string cacheKey = "ExpensableAccounts-Json-" + + string cacheKey = "ExpensableBudgets-Json-" + this.CurrentOrganization.Identity.ToString((CultureInfo.InvariantCulture)); string accountsJson = @@ -37,7 +37,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial // Get accounts - FinancialAccounts accounts = this.CurrentOrganization.FinancialAccounts.ExpensableAccounts; + FinancialAccounts accounts = this.CurrentOrganization.FinancialAccounts.ExpensableBudgets; // Build tree (there should be a template for this) diff --git a/Site5/Pages/v5/Finance/Json-ExpensableBudgetsTree.aspx.cs b/Site5/Pages/v5/Finance/Json-ExpensableBudgetsTree.aspx.cs index 09a76458..a09aa61c 100644 --- a/Site5/Pages/v5/Finance/Json-ExpensableBudgetsTree.aspx.cs +++ b/Site5/Pages/v5/Finance/Json-ExpensableBudgetsTree.aspx.cs @@ -35,7 +35,7 @@ namespace Swarmops.Frontend.Pages.v5.Finance // Is this stuff in cache already? - string cacheKey = "ExpensableAccounts-Json-" + + string cacheKey = "ExpensableBudgets-Json-" + currentOrganizationId.ToString((CultureInfo.InvariantCulture)); string accountsJson = @@ -52,7 +52,7 @@ namespace Swarmops.Frontend.Pages.v5.Finance // Get accounts - FinancialAccounts accounts = currentOrganization.FinancialAccounts.ExpensableAccounts; + FinancialAccounts accounts = currentOrganization.FinancialAccounts.ExpensableBudgets; // Build tree (there should be a template for this)