Skip to content

Commit

Permalink
Fixed dialog as it allowed to create a dividend tx w/o security info
Browse files Browse the repository at this point in the history
  • Loading branch information
buchen committed Dec 3, 2017
1 parent 741d2d3 commit cf12bd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ private ComboInput setupSecurities(Composite editArea)
// add empty security only if it has not been added previously
// --> happens when editing an existing transaction
if (model().supportsOptionalSecurity() && !activeSecurities.contains(AccountTransactionModel.EMPTY_SECURITY))
{
activeSecurities.add(0, AccountTransactionModel.EMPTY_SECURITY);

if (model().getSecurity() == null)
model().setSecurity(AccountTransactionModel.EMPTY_SECURITY);
}

ComboInput securities = new ComboInput(editArea, Messages.ColumnSecurity);
securities.value.setInput(activeSecurities);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum Properties
private Account sourceAccount;
private AccountTransaction sourceTransaction;

private Security security = EMPTY_SECURITY;
private Security security;
private Account account;
private LocalDate date = LocalDate.now();
private long shares;
Expand Down

0 comments on commit cf12bd2

Please sign in to comment.