From cfa76018d06a098870bcdb308e80f7fa6ddec2d1 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 24 Jan 2015 09:56:16 +0100 Subject: [PATCH] Account Plan enhancements 5 --- Site5/Automation/Json-FinancialAccountsTree.aspx.cs | 4 +++- Site5/Pages/v5/Ledgers/AccountPlan.aspx | 2 +- Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Site5/Automation/Json-FinancialAccountsTree.aspx.cs b/Site5/Automation/Json-FinancialAccountsTree.aspx.cs index cc74a6b7..4b221aa1 100644 --- a/Site5/Automation/Json-FinancialAccountsTree.aspx.cs +++ b/Site5/Automation/Json-FinancialAccountsTree.aspx.cs @@ -27,6 +27,8 @@ namespace Swarmops.Frontend.Automation excludeId = Int32.Parse (excludeIdString); } + int resultsAccountId = CurrentOrganization.FinancialAccounts.CostsYearlyResult.Identity; + // Get accounts FinancialAccounts accounts = FinancialAccounts.ForOrganization (CurrentOrganization, accountType); @@ -37,7 +39,7 @@ namespace Swarmops.Frontend.Automation foreach (FinancialAccount account in accounts) { - if (account.Identity == excludeId) + if (account.Identity == excludeId || account.Identity == resultsAccountId) { continue; } diff --git a/Site5/Pages/v5/Ledgers/AccountPlan.aspx b/Site5/Pages/v5/Ledgers/AccountPlan.aspx index 0e1e74f7..7a67b5f4 100644 --- a/Site5/Pages/v5/Ledgers/AccountPlan.aspx +++ b/Site5/Pages/v5/Ledgers/AccountPlan.aspx @@ -49,7 +49,7 @@ beginEditAccount(); }); - if ($('#CheckOptionShowInactive').prop("checked")) + if ($('#CheckOptionsShowInactive').prop("checked")) { $('.RowInactive').show(); } diff --git a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs index 20481af1..b6413613 100644 --- a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs @@ -64,7 +64,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers } else if (type == FinancialAccountType.Cost && projectedResults >= 0) // expected loss or zero { - childrenString += "," + GetProfitLossNode("ProjectedLoss", projectedResults); + childrenString += "," + GetProfitLossNode("ProjectedLoss", -projectedResults); } string addString =