Exemple #1
0
        private void PopulateTotals()
        {
            this.Totals = new YearlyReportNode();

            this.Totals.PreviousYear = PopulateOneTotal(this._singleLookups[0]);
            this.Totals.ThisYear     = PopulateOneTotal(this._singleLookups[5]);

            for (int quarter = 0; quarter < 4; quarter++)
            {
                this.Totals.Quarters[quarter] = PopulateOneTotal(this._singleLookups[quarter + 1]);
            }
        }
Exemple #2
0
        private YearlyReportNode CreateYearlyReportNode(int accountId, Dictionary <int, Int64>[] lookup)
        {
            YearlyReportNode node = new YearlyReportNode();

            node.PreviousYear = lookup[0][accountId];

            for (int quarter = 1; quarter <= 4; quarter++)
            {
                node.Quarters[quarter - 1] = lookup[quarter][accountId];
            }

            node.ThisYear = lookup[5][accountId];
            return(node);
        }
    private string WriteFooter (YearlyReportNode totals)
    {
        string result = string.Format("\"name\":\"{0}\"", Resources.Pages.Ledgers.ProfitLossStatement_Results);

        result += string.Format(_renderCulture, ",\"lastYear\":\"{0:N0}\"", (double)totals.PreviousYear / -100.0);

        for (int quarter = 1; quarter <= 4; quarter++)
        {
            result += string.Format(_renderCulture, ",\"q{0}\":\"{1:N0}\"", quarter, totals.Quarters[quarter-1] / -100.0);
        }

        result += string.Format(_renderCulture, ",\"ytd\":\"{0:N0}\"", (double)totals.ThisYear / -100.0);

        return "{" + result + "}";
    }
Exemple #4
0
 public YearlyReportLine()
 {
     Children = new List<YearlyReportLine>();
     AccountValues = new YearlyReportNode();
     AccountTreeValues = new YearlyReportNode();
 }
Exemple #5
0
        private YearlyReportNode CreateYearlyReportNode (int accountId, Dictionary<int, Int64>[] lookup)
        {
            YearlyReportNode node = new YearlyReportNode();
            node.PreviousYear = lookup[0][accountId];
            
            for (int quarter = 1; quarter <= 4; quarter++)
            {
                node.Quarters[quarter - 1] = lookup[quarter][accountId];
            }

            node.ThisYear = lookup[5][accountId];
            return node;
        }
Exemple #6
0
 public YearlyReportLine()
 {
     Children          = new List <YearlyReportLine>();
     AccountValues     = new YearlyReportNode();
     AccountTreeValues = new YearlyReportNode();
 }