@@ -154,45 +154,36 @@ protected void businessProcessing() throws TCWebException {
154
154
if (payment .getPaymentType () == 3 || payment .getPaymentType () == 5 ) {
155
155
removePayments .add (payment );
156
156
} else {
157
- if (payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .CANCELLED_PAYMENT_STATUS )) ||
158
- payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .EXPIRED_PAYMENT_STATUS )) ||
159
- payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .PAID_PAYMENT_STATUS ))) {
157
+ if (!( payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .OWED_PAYMENT_STATUS ))) &&
158
+ !( payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .ENTERED_INTO_PAYMENT_SYSTEM_PAYMENT_STATUS ))) &&
159
+ !( payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .ACCRUING_PAYMENT_STATUS ) ))) {
160
160
removeNonPending .add (payment );
161
161
}
162
-
163
- // Deleted payments should not be shown either way.
164
- if (payment .getCurrentStatus ().equals (PaymentStatusFactory .createStatus (PaymentStatus .DELETED_PAYMENT_STATUS ))) {
165
- removePayments .add (payment );
166
- }
167
162
}
168
163
}
169
164
170
165
payments .removeAll (removePayments );
171
166
172
- int totalPayment = payments .size ();
173
-
174
- if (!fullList && !exportToExcel ) {
175
- if (removeNonPending .size () > 0 ) {
176
- payments .removeAll (removeNonPending );
177
- }
178
- }
179
-
180
- int PaymentsPending = totalPayment - removeNonPending .size ();
181
-
182
167
// sort the result in the first place
183
168
sortResult (payments , sortCol , sortAscending );
184
169
185
170
if ("on" .equalsIgnoreCase (com .topcoder .web .tc .Constants .GLOBAL_AD_FLAG )) {
186
171
removeDuplicateReasons (payments );
187
172
}
188
173
174
+ int totalPayment = payments .size ();
175
+
189
176
if (!fullList && !exportToExcel ) {
190
- getRequest (). setAttribute ( "NUM_TOTAL" , PaymentsPending );
191
- } else {
192
- getRequest (). setAttribute ( "NUM_TOTAL" , totalPayment );
177
+ if ( removeNonPending . size () > 0 ) {
178
+ payments . removeAll ( removeNonPending );
179
+ }
193
180
}
181
+
182
+ int pendingPayments = totalPayment - removeNonPending .size ();
183
+
184
+ getRequest ().setAttribute ("NUM_TOTAL" , payments .size ());
194
185
getRequest ().setAttribute ("NUM_PER_PAGE" , numRecords );
195
- getRequest ().setAttribute ("NUM_PENDING" , PaymentsPending );
186
+ getRequest ().setAttribute ("NUM_PENDING" , pendingPayments );
196
187
197
188
if (exportToExcel ) {
198
189
produceXLS (payments );
0 commit comments