From 3466293bd5ef3231754c9384d05c9c8f1d716705 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Tue, 11 Dec 2012 22:14:26 +0000 Subject: [PATCH] Another fix for balance sheet (sign reversal) --- Site5/Pages/v5/Ledgers/Json-BalanceSheetData.aspx.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Site5/Pages/v5/Ledgers/Json-BalanceSheetData.aspx.cs b/Site5/Pages/v5/Ledgers/Json-BalanceSheetData.aspx.cs index 0582c8ee..9cb8b135 100644 --- a/Site5/Pages/v5/Ledgers/Json-BalanceSheetData.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-BalanceSheetData.aspx.cs @@ -97,14 +97,14 @@ public partial class Pages_v5_Ledgers_Json_BalanceSheetData : System.Web.UI.Page } else { - element += string.Format(_renderCulture, ",\"lastYear\":\"{0:N0}\"", (double)line.AccountValues.PreviousYear / -100.0); + element += string.Format(_renderCulture, ",\"lastYear\":\"{0:N0}\"", (double)line.AccountValues.PreviousYear / 100.0); for (int quarter = 1; quarter <= 4; quarter++) { - element += string.Format(_renderCulture, ",\"q{0}\":\"{1:N0}\"", quarter, line.AccountValues.Quarters[quarter - 1] / -100.0); + element += string.Format(_renderCulture, ",\"q{0}\":\"{1:N0}\"", quarter, line.AccountValues.Quarters[quarter - 1] / 100.0); } - element += string.Format(_renderCulture, ",\"ytd\":\"{0:N0}\"", (double)line.AccountValues.ThisYear / -100.0); + element += string.Format(_renderCulture, ",\"ytd\":\"{0:N0}\"", (double)line.AccountValues.ThisYear / 100.0); } elements.Add("{" + element + "}"); @@ -118,9 +118,9 @@ public partial class Pages_v5_Ledgers_Json_BalanceSheetData : System.Web.UI.Page { if (treeValue != 0 && singleValue == 0) { - return string.Format(_renderCulture, "\"Σ {1:N0} \"", accountId, treeValue / -100.00); + return string.Format(_renderCulture, "\"Σ {1:N0} \"", accountId, treeValue / 100.00); } - return string.Format(_renderCulture, "\"Σ {1:N0}{2:N0}\"", accountId, treeValue / -100.0, singleValue / -100.0); + return string.Format(_renderCulture, "\"Σ {1:N0}{2:N0}\"", accountId, treeValue / 100.0, singleValue / 100.0); }