diff --git a/Logic/Financial/AnnualReport.cs b/Logic/Financial/AnnualReport.cs
index 00a63b12..58d79648 100644
--- a/Logic/Financial/AnnualReport.cs
+++ b/Logic/Financial/AnnualReport.cs
@@ -99,9 +99,9 @@ namespace Swarmops.Logic.Financial
if (this._accountType == FinancialAccountType.Balance)
{
AnnualReportLine assetLine = new AnnualReportLine
- {AccountId = assetIdentity, AccountName = "%ASSET_ACCOUNTGROUP%"};
+ {AccountId = assetIdentity, AccountName = "%ASSET_ACCOUNTGROUP%", AccountType = FinancialAccountType.Asset};
AnnualReportLine debtLine = new AnnualReportLine
- {AccountId = debtIdentity, AccountName = "%DEBT_ACCOUNTGROUP%"};
+ {AccountId = debtIdentity, AccountName = "%DEBT_ACCOUNTGROUP%", AccountType = FinancialAccountType.Debt};
remapLookup[FinancialAccountType.Asset] = assetLine;
remapLookup[FinancialAccountType.Debt] = debtLine;
diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
index c502d1dd..b7a78636 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs
+++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs
@@ -348,6 +348,15 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to (change).
+ ///
+ internal static string BalanceSheet_AssetsDelta {
+ get {
+ return ResourceManager.GetString("BalanceSheet_AssetsDelta", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Balance Sheet for {0},.
///
@@ -366,15 +375,6 @@ namespace Resources.Pages {
}
}
- ///
- /// Looks up a localized string similar to (change).
- ///
- internal static string BalanceSheet_Delta {
- get {
- return ResourceManager.GetString("BalanceSheet_Delta", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to BalanceSheet.
///
@@ -411,6 +411,15 @@ namespace Resources.Pages {
}
}
+ ///
+ /// Looks up a localized string similar to (change).
+ ///
+ internal static string BalanceSheet_LiabilitiesDelta {
+ get {
+ return ResourceManager.GetString("BalanceSheet_LiabilitiesDelta", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Balance Sheet.
///
diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx
index ecafd1fb..78cd14f0 100644
--- a/Site/App_GlobalResources/Pages.Ledgers.resx
+++ b/Site/App_GlobalResources/Pages.Ledgers.resx
@@ -789,7 +789,7 @@
Assets XXXX
For the simplified view - XXXX is replaced with year
-
+
(change)
Change from previous year's close, which is same as from start of this year
@@ -797,4 +797,8 @@
Liabilities XXXX
For the simplified view - XXXX is replaced with year
+
+ (change)
+ Change from previous year's close, which is same as from start of this year
+
\ No newline at end of file
diff --git a/Site/MainMenu-v5-OpenLedgers.xml b/Site/MainMenu-v5-OpenLedgers.xml
index dc2bec5f..a5451b0a 100644
--- a/Site/MainMenu-v5-OpenLedgers.xml
+++ b/Site/MainMenu-v5-OpenLedgers.xml
@@ -8,7 +8,7 @@
0
- /Pages/v5/Ledgers/BalanceSheet.aspx
+ /Ledgers/Balance
Link
@@ -18,7 +18,7 @@
0
- /Pages/v5/Ledgers/ProfitLossStatement.aspx
+ /Ledgers/ProfitLossStatement
Link
@@ -28,7 +28,7 @@
0
- /Pages/v5/Ledgers/BudgetActual.aspx
+ /Ledgers/BudgetActual
Link
@@ -38,7 +38,7 @@
3
- /Pages/v5/Ledgers/InspectLedgers.aspx
+ /Ledgers/InspectLedgers
Link
diff --git a/Site/Pages/v5/Ledgers/BalanceSheet.aspx b/Site/Pages/v5/Ledgers/BalanceSheet.aspx
index cafe3d65..29a4623e 100644
--- a/Site/Pages/v5/Ledgers/BalanceSheet.aspx
+++ b/Site/Pages/v5/Ledgers/BalanceSheet.aspx
@@ -8,14 +8,14 @@
$('#tableProfitLoss').treegrid(
{
onBeforeExpand: function (foo) {
- $('span.profitlossdata-collapsed-' + foo.id).fadeOut('fast', function () {
- $('span.profitlossdata-expanded-' + foo.id).fadeIn('slow');
+ $('span.annualreportdata-collapsed-' + foo.id).fadeOut('fast', function () {
+ $('span.annualreportdata-expanded-' + foo.id).fadeIn('slow');
});
},
onBeforeCollapse: function (foo) {
- $('span.profitlossdata-expanded-' + foo.id).fadeOut('fast', function () {
- $('span.profitlossdata-collapsed-' + foo.id).fadeIn('slow');
+ $('span.annualreportdata-expanded-' + foo.id).fadeOut('fast', function () {
+ $('span.annualreportdata-collapsed-' + foo.id).fadeIn('slow');
});
},
diff --git a/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx b/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx
index d7e993af..8772e985 100644
--- a/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx
+++ b/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx
@@ -8,14 +8,14 @@
$('#tableAnnualReport').treegrid(
{
onBeforeExpand: function (foo) {
- $('span.profitlossdata-collapsed-' + foo.id).fadeOut('fast', function () {
- $('span.profitlossdata-expanded-' + foo.id).fadeIn('slow');
+ $('span.annualreportdata-collapsed-' + foo.id).fadeOut('fast', function () {
+ $('span.annualreportdata-expanded-' + foo.id).fadeIn('slow');
});
},
onBeforeCollapse: function (foo) {
- $('span.profitlossdata-expanded-' + foo.id).fadeOut('fast', function () {
- $('span.profitlossdata-collapsed-' + foo.id).fadeIn('slow');
+ $('span.annualreportdata-expanded-' + foo.id).fadeOut('fast', function () {
+ $('span.annualreportdata-collapsed-' + foo.id).fadeIn('slow');
});
},
@@ -27,8 +27,9 @@
var selectedYear = $('#<%=DropYears.ClientID %>').val();
$('div#linkDownloadReport').attr("onclick", "document.location='Csv-BalanceData.aspx?Year=" + selectedYear + "';");
- $('#spanDownloadText').text(SwarmopsJS.unescape('<%= this.Localized_DownloadFileName %>') + selectedYear + "-<%=DateTime.Today.ToString("yyyyMMdd") %>.csv");
- $('#headerStartYear').text(SwarmopsJS.unescape('<%= this.Localized_Assets %>'.replace('XXXX',selectedYear)));
+ $('#spanDownloadText').text(SwarmopsJS.unescape('<%= this.Localized_DownloadFileName %>') + selectedYear + "-<%=DateTime.UtcNow.ToString("yyyyMMdd") %>.csv");
+ $('#headerAssetsCardinal').text(SwarmopsJS.unescape('<%= this.Localized_Assets %>'.replace('XXXX',selectedYear)));
+ $('#headerLiabilitiesCardinal').text(SwarmopsJS.unescape('<%= this.Localized_Liabilities %>'.replace('XXXX',selectedYear)));
if (selectedYear == currentYear)
{
@@ -50,7 +51,7 @@
$('#<%=DropYears.ClientID %>').change(function () {
var selectedYear = $('#<%=DropYears.ClientID %>').val();
- $('#tableAnnualReport').treegrid({ url: 'Json-BalanceSheetData.aspx?Year=' + selectedYear });
+ $('#tableAnnualReport').treegrid({ url: 'Json-BalanceSheetDataSimplified.aspx?Year=' + selectedYear });
$('#imageLoadIndicator').show();
$('div.datagrid').css('opacity', 0.4);
@@ -86,10 +87,10 @@
|
- |
- |
- |
- |
+ |
+ |
+ |
+ |
diff --git a/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx.cs b/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx.cs
index 0d820e82..f57c4540 100644
--- a/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx.cs
+++ b/Site/Pages/v5/Ledgers/BalanceSheetSimplified.aspx.cs
@@ -55,12 +55,12 @@ namespace Swarmops.Frontend.Pages.Ledgers
{
this.LabelContentHeader.Text = string.Format (Resources.Pages.Ledgers.BalanceSheet_ContentHeader,
CurrentOrganization.Name);
- /*
- this.LiteralHeaderQ1.Text = Resources.Pages.Ledgers.BalanceSheet_Q1;
- this.LiteralHeaderQ2.Text = Resources.Pages.Ledgers.BalanceSheet_Q2;
- this.LiteralHeaderQ3.Text = Resources.Pages.Ledgers.BalanceSheet_Q3;
- this.LiteralHeaderQ4.Text = Resources.Pages.Ledgers.BalanceSheet_Q4;
- this.LiteralHeaderYtd.Text = Resources.Pages.Ledgers.BalanceSheet_Current;*/
+
+ this.LiteralAssetsDelta.Text = Resources.Pages.Ledgers.BalanceSheet_AssetsDelta;
+ this.LiteralLiabilitiesDelta.Text = Resources.Pages.Ledgers.BalanceSheet_LiabilitiesDelta;
+ this.LiteralAssets.Text = Resources.Pages.Ledgers.BalanceSheet_Assets;
+ this.LiteralLiabilities.Text = Resources.Pages.Ledgers.BalanceSheet_Liabilities;
+
this.LiteralHeaderAccountName.Text = Resources.Pages.Ledgers.BalanceSheet_AccountName;
}
diff --git a/Site/Pages/v5/Ledgers/Json-BalanceSheetDataSimplified.aspx.cs b/Site/Pages/v5/Ledgers/Json-BalanceSheetDataSimplified.aspx.cs
index a81bec49..c69d1998 100644
--- a/Site/Pages/v5/Ledgers/Json-BalanceSheetDataSimplified.aspx.cs
+++ b/Site/Pages/v5/Ledgers/Json-BalanceSheetDataSimplified.aspx.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
+using System.Web.UI.WebControls;
using Swarmops.Common.Enums;
using Swarmops.Logic.Financial;
@@ -85,22 +86,24 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
{
element += ",\"" + columnCardinal + "\":" +
JsonDualString (line.AccountId, line.AccountTreeValues.ThisYear * signReverser,
- line.AccountValues.ThisYear * signReverser);
+ line.AccountValues.ThisYear * signReverser, line.DefaultExpand);
element += ",\"" + columnDelta + "\":" +
JsonDualString (line.AccountId, (line.AccountTreeValues.ThisYear-line.AccountTreeValues.PreviousYear) * signReverser,
- (line.AccountValues.ThisYear-line.AccountValues.PreviousYear) * signReverser);
+ (line.AccountValues.ThisYear-line.AccountValues.PreviousYear) * signReverser, line.DefaultExpand, string.Empty, "(+#,#.);(-#,#.);---");
element += ",\"state\":\"" + (line.DefaultExpand? "open":"closed") + "\",\"children\":" + RecurseReport (line.Children);
}
else
{
- element += string.Format (CultureInfo.CurrentCulture, ",\"" + columnCardinal + "\":\"{0:N2}\"",
- (double) line.AccountValues.PreviousYear/100.0*signReverser);
+ element += string.Format (CultureInfo.CurrentCulture, ",\"" + columnCardinal + "\":\"{0:N0}\"",
+ (double) line.AccountValues.ThisYear/100.0*signReverser);
- element += string.Format (CultureInfo.CurrentCulture, ",\"" + columnDelta + "\":\"({0:+#,#;-#,#;0})\"",
- (double) line.AccountValues.ThisYear/100.0*signReverser).Replace("-", "−");
+ element += string.Format (CultureInfo.CurrentCulture, ",\"" + columnDelta + "\":\"{0:(+#,#.);(-#,#.);---}\"",
+ (double) (line.AccountValues.ThisYear-line.AccountValues.PreviousYear)/100.0*signReverser)
+ .Replace("---","—")
+ .Replace("-", "−");
}
elements.Add ("{" + element + "}");
@@ -110,17 +113,21 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
}
- private string JsonDualString (int accountId, Int64 treeValue, Int64 singleValue)
+ private string JsonDualString (int accountId, Int64 treeValue, Int64 singleValue, bool expanded, string sigma = "Σ", string format = "N0")
{
- if (treeValue != 0 && singleValue == 0)
+ if (expanded || treeValue != 0 && singleValue == 0)
{
return string.Format (CultureInfo.CurrentCulture,
- "\"Σ {1:N0} \"",
- accountId, treeValue/100.00);
+ "\"" + sigma + " {1:" + format + "} \"",
+ accountId, treeValue/100.00)
+ .Replace("---", "—")
+ .Replace("-", "−");
}
return string.Format (CultureInfo.CurrentCulture,
- "\"Σ {1:N0}{2:N0}\"",
- accountId, treeValue/100.0, singleValue/100.0);
+ "\"" + sigma + " {1:" + format + "}{2:" + format + "}\"",
+ accountId, treeValue/100.0, singleValue/100.0)
+ .Replace("---", "—")
+ .Replace("-", "−");
}
}
}
\ No newline at end of file