diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java index 949218a244f..0989146f6a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java @@ -69,6 +69,10 @@ public String getCode() { public boolean isApproved() { return this.value.equals(PurchasedSharesStatusType.APPROVED.getValue()); } + + public boolean isRejected() { + return this.value.equals(PurchasedSharesStatusType.REJECTED.getValue()); + } public boolean isPurchased() { return this.value.equals(PurchasedSharesStatusType.PURCHASED.getValue()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java index 085126816ba..d51a99340fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java @@ -439,7 +439,7 @@ public void reject(final Date rejectedDate, final AppUser rejectedUser) { this.totalSharesPending = null; this.totalSharesApproved = null; for (ShareAccountTransaction transaction : this.shareAccountTransactions) { - if(transaction.isPurchasTransaction()) { + if(transaction.isPendingForApprovalTransaction()) { transaction.reject(); } }