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 java.util.LinkedHashMap;
19
20 import org.kuali.ole.sys.OLEKeyConstants;
21 import org.kuali.ole.sys.context.SpringContext;
22 import org.kuali.rice.core.api.config.property.ConfigurationService;
23 import org.kuali.rice.core.api.util.type.KualiDecimal;
24 import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
25
26
27
28
29 public class LedgerSummaryTotalLine extends TransientBusinessObjectBase {
30 private KualiDecimal debitAmount = KualiDecimal.ZERO;
31 private int debitCount = 0;
32 private KualiDecimal creditAmount = KualiDecimal.ZERO;
33 private int creditCount = 0;
34 private KualiDecimal budgetAmount = KualiDecimal.ZERO;
35 private int budgetCount = 0;
36
37
38
39
40 public int getRecordCount() {
41 return debitCount + creditCount + budgetCount;
42 }
43
44
45
46
47 public KualiDecimal getDebitAmount() {
48 return debitAmount;
49 }
50
51
52
53
54 public int getDebitCount() {
55 return debitCount;
56 }
57
58
59
60
61 public KualiDecimal getCreditAmount() {
62 return creditAmount;
63 }
64
65
66
67
68 public int getCreditCount() {
69 return creditCount;
70 }
71
72
73
74
75 public KualiDecimal getBudgetAmount() {
76 return budgetAmount;
77 }
78
79
80
81
82 public int getBudgetCount() {
83 return budgetCount;
84 }
85
86
87
88
89
90 public void addDebitAmount(KualiDecimal debitAmount) {
91 this.debitAmount = this.debitAmount.add(debitAmount);
92 this.debitCount += 1;
93 }
94
95
96
97
98
99 public void addCreditAmount(KualiDecimal creditAmount) {
100 this.creditAmount = this.creditAmount.add(creditAmount);
101 this.creditCount += 1;
102 }
103
104
105
106
107
108 public void addBudgetAmount(KualiDecimal budgetAmount) {
109 this.budgetAmount = this.budgetAmount.add(budgetAmount);
110 this.budgetCount += 1;
111 }
112
113
114
115
116
117 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
118 return new LinkedHashMap();
119 }
120
121
122
123
124 public String getSummary() {
125 return SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(OLEKeyConstants.MESSAGE_REPORT_NIGHTLY_OUT_LEDGER_TOTAL);
126 }
127 }