From 916d13d2911c82fc759d398f50bb9d1180922e9f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 9 May 2016 17:31:09 +0200 Subject: [PATCH] Sorted accounts _after_ localization --- Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs index 2a9ecea0..ffd1bba2 100644 --- a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.Linq; using System.Threading; using Resources; using Swarmops.Common.Enums; @@ -114,7 +115,9 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers return string.Empty; } - foreach (FinancialAccount account in this._hashedAccounts[rootNodeId]) + IOrderedEnumerable childAccountsSorted = this._hashedAccounts[rootNodeId].OrderBy(account => account.Name);; + + foreach (FinancialAccount account in childAccountsSorted) { if (account.Identity == rootNodeId || account.AccountType != accountType || account.Identity == _resultAccountId) {