1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.gl.businessobject;
17
18 import org.kuali.rice.core.api.util.type.KualiDecimal;
19
20
21
22
23 public class GlSummary extends Balance{
24
25
26
27
28 public GlSummary() {
29 super();
30 }
31
32
33
34
35
36 public GlSummary(Object[] data) {
37 this.setFundGroup((String) data[0]);
38
39 this.setAccountLineAnnualBalanceAmount((KualiDecimal) data[1]);
40 this.setBeginningBalanceLineAmount((KualiDecimal) data[2]);
41 this.setContractsGrantsBeginningBalanceAmount((KualiDecimal) data[3]);
42 this.setMonth1Amount((KualiDecimal) data[4]);
43 this.setMonth2Amount((KualiDecimal) data[5]);
44 this.setMonth3Amount((KualiDecimal) data[6]);
45 this.setMonth4Amount((KualiDecimal) data[7]);
46 this.setMonth5Amount((KualiDecimal) data[8]);
47 this.setMonth6Amount((KualiDecimal) data[9]);
48 this.setMonth7Amount((KualiDecimal) data[10]);
49 this.setMonth8Amount((KualiDecimal) data[11]);
50 this.setMonth9Amount((KualiDecimal) data[12]);
51 this.setMonth10Amount((KualiDecimal) data[13]);
52 this.setMonth11Amount((KualiDecimal) data[14]);
53 this.setMonth12Amount((KualiDecimal) data[15]);
54 this.setMonth13Amount((KualiDecimal) data[16]);
55 }
56
57
58
59
60 public void add(GlSummary anotherSummary) {
61 setBeginningBalanceLineAmount(getBeginningBalanceLineAmount().add(anotherSummary.getBeginningBalanceLineAmount()));
62 setContractsGrantsBeginningBalanceAmount(getContractsGrantsBeginningBalanceAmount().add(anotherSummary.getContractsGrantsBeginningBalanceAmount()));
63 setAccountLineAnnualBalanceAmount(getAccountLineAnnualBalanceAmount().add(anotherSummary.getAccountLineAnnualBalanceAmount()));
64 setMonth1Amount(getMonth1Amount().add(anotherSummary.getMonth1Amount()));
65 setMonth2Amount(getMonth2Amount().add(anotherSummary.getMonth2Amount()));
66 setMonth3Amount(getMonth3Amount().add(anotherSummary.getMonth3Amount()));
67 setMonth4Amount(getMonth4Amount().add(anotherSummary.getMonth4Amount()));
68 setMonth5Amount(getMonth5Amount().add(anotherSummary.getMonth5Amount()));
69 setMonth6Amount(getMonth6Amount().add(anotherSummary.getMonth6Amount()));
70 setMonth7Amount(getMonth7Amount().add(anotherSummary.getMonth7Amount()));
71 setMonth8Amount(getMonth8Amount().add(anotherSummary.getMonth8Amount()));
72 setMonth9Amount(getMonth9Amount().add(anotherSummary.getMonth9Amount()));
73 setMonth10Amount(getMonth10Amount().add(anotherSummary.getMonth10Amount()));
74 setMonth11Amount(getMonth11Amount().add(anotherSummary.getMonth11Amount()));
75 setMonth12Amount(getMonth12Amount().add(anotherSummary.getMonth12Amount()));
76 setMonth13Amount(getMonth13Amount().add(anotherSummary.getMonth13Amount()));
77 }
78
79
80
81
82 @Override
83 public KualiDecimal getYearBalance() {
84 KualiDecimal yearbalance = KualiDecimal.ZERO;
85
86 yearbalance = yearbalance.add(this.getMonth1Amount());
87 yearbalance = yearbalance.add(this.getMonth2Amount());
88 yearbalance = yearbalance.add(this.getMonth3Amount());
89 yearbalance = yearbalance.add(this.getMonth4Amount());
90 yearbalance = yearbalance.add(this.getMonth5Amount());
91 yearbalance = yearbalance.add(this.getMonth6Amount());
92 yearbalance = yearbalance.add(this.getMonth7Amount());
93 yearbalance = yearbalance.add(this.getMonth8Amount());
94 yearbalance = yearbalance.add(this.getMonth9Amount());
95 yearbalance = yearbalance.add(this.getMonth10Amount());
96 yearbalance = yearbalance.add(this.getMonth11Amount());
97 yearbalance = yearbalance.add(this.getMonth12Amount());
98 yearbalance = yearbalance.add(this.getMonth13Amount());
99
100 return yearbalance;
101 }
102
103
104
105
106 @Override
107 public KualiDecimal getYearToDayBalance() {
108 KualiDecimal yearToDayBalance = KualiDecimal.ZERO;
109
110 yearToDayBalance = yearToDayBalance.add(this.getAccountLineAnnualBalanceAmount());
111 yearToDayBalance = yearToDayBalance.add(this.getBeginningBalanceLineAmount());
112 yearToDayBalance = yearToDayBalance.add(this.getContractsGrantsBeginningBalanceAmount());
113
114 return yearToDayBalance;
115 }
116
117
118 }