@@ -154,45 +154,36 @@ protected void businessProcessing() throws TCWebException {
154154 if (payment .getPaymentType () == 3 || payment .getPaymentType () == 5 ) {
155155 removePayments .add (payment );
156156 } 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 ) ))) {
160160 removeNonPending .add (payment );
161161 }
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- }
167162 }
168163 }
169164
170165 payments .removeAll (removePayments );
171166
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-
182167 // sort the result in the first place
183168 sortResult (payments , sortCol , sortAscending );
184169
185170 if ("on" .equalsIgnoreCase (com .topcoder .web .tc .Constants .GLOBAL_AD_FLAG )) {
186171 removeDuplicateReasons (payments );
187172 }
188173
174+ int totalPayment = payments .size ();
175+
189176 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+ }
193180 }
181+
182+ int pendingPayments = totalPayment - removeNonPending .size ();
183+
184+ getRequest ().setAttribute ("NUM_TOTAL" , payments .size ());
194185 getRequest ().setAttribute ("NUM_PER_PAGE" , numRecords );
195- getRequest ().setAttribute ("NUM_PENDING" , PaymentsPending );
186+ getRequest ().setAttribute ("NUM_PENDING" , pendingPayments );
196187
197188 if (exportToExcel ) {
198189 produceXLS (payments );
0 commit comments