FINERACT-574

This commit is contained in:
Nenge
2018-02-08 15:05:39 +03:00
parent 8ac5485544
commit 613b802c0d
2 changed files with 5 additions and 1 deletions
@@ -70,6 +70,10 @@ public enum PurchasedSharesStatusType {
return this.value.equals(PurchasedSharesStatusType.APPROVED.getValue()); return this.value.equals(PurchasedSharesStatusType.APPROVED.getValue());
} }
public boolean isRejected() {
return this.value.equals(PurchasedSharesStatusType.REJECTED.getValue());
}
public boolean isPurchased() { public boolean isPurchased() {
return this.value.equals(PurchasedSharesStatusType.PURCHASED.getValue()); return this.value.equals(PurchasedSharesStatusType.PURCHASED.getValue());
} }
@@ -439,7 +439,7 @@ public class ShareAccount extends AbstractPersistableCustom<Long> {
this.totalSharesPending = null; this.totalSharesPending = null;
this.totalSharesApproved = null; this.totalSharesApproved = null;
for (ShareAccountTransaction transaction : this.shareAccountTransactions) { for (ShareAccountTransaction transaction : this.shareAccountTransactions) {
if(transaction.isPurchasTransaction()) { if(transaction.isPendingForApprovalTransaction()) {
transaction.reject(); transaction.reject();
} }
} }