Edit share account is not working because of merge
This commit is contained in:
+4
-4
@@ -354,10 +354,10 @@ public class ShareAccount extends AbstractPersistable<Long> {
|
||||
}
|
||||
|
||||
public void updateRequestedShares(ShareAccountTransaction purchased) {
|
||||
if (!this.shareAccountTransactions.isEmpty()) {
|
||||
Iterator<ShareAccountTransaction> iter = this.shareAccountTransactions.iterator();
|
||||
ShareAccountTransaction existing = iter.next();
|
||||
existing.update(purchased.getPurchasedDate(), purchased.getTotalShares(), purchased.getPurchasePrice());
|
||||
for(ShareAccountTransaction transaction: this.shareAccountTransactions) {
|
||||
if(!transaction.isChargeTransaction() && transaction.getId().equals(purchased.getId())) {
|
||||
transaction.update(purchased.getPurchasedDate(), purchased.getTotalShares(), purchased.getPurchasePrice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ public class ShareAccountTransaction extends AbstractPersistable<Long> {
|
||||
final Integer status = PurchasedSharesStatusType.APPROVED.getValue() ;
|
||||
final Integer type = PurchasedSharesStatusType.CHARGE_PAYMENT.getValue() ;
|
||||
BigDecimal amount = charge.percentageOrAmount() ;
|
||||
BigDecimal chargeAmount = amount ;
|
||||
BigDecimal chargeAmount = null ;
|
||||
return new ShareAccountTransaction(transactionDate, totalShares, unitPrice, status, type, amount, chargeAmount) ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user