Ejemplo n.º 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]);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
    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 + "}";
    }
Ejemplo n.º 4
0
 public YearlyReportLine()
 {
     Children = new List<YearlyReportLine>();
     AccountValues = new YearlyReportNode();
     AccountTreeValues = new YearlyReportNode();
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
 public YearlyReportLine()
 {
     Children          = new List <YearlyReportLine>();
     AccountValues     = new YearlyReportNode();
     AccountTreeValues = new YearlyReportNode();
 }