use of jgnash.util.NotNull in project jgnash by ccavanaugh.
the class AdjustSharesSlipController method buildTransaction.
@NotNull
@Override
public Transaction buildTransaction() {
final Transaction transaction;
if (tranType == TransactionType.ADDSHARE) {
transaction = TransactionFactory.generateAddXTransaction(accountProperty().get(), securityComboBox.getValue(), priceField.getDecimal(), quantityField.getDecimal(), datePicker.getValue(), memoTextField.getText());
} else {
transaction = TransactionFactory.generateRemoveXTransaction(accountProperty().get(), securityComboBox.getValue(), priceField.getDecimal(), quantityField.getDecimal(), datePicker.getValue(), memoTextField.getText());
}
transaction.setNumber(numberComboBox.getValue());
return attachmentPane.buildTransaction(transaction);
}
use of jgnash.util.NotNull in project jgnash by ccavanaugh.
the class BuyShareSlipController method buildTransaction.
@NotNull
@Override
public Transaction buildTransaction() {
final BigDecimal exchangeRate = accountExchangePane.getExchangeRate();
final List<TransactionEntry> fees = feePane.getTransactions();
final Transaction transaction = TransactionFactory.generateBuyXTransaction(accountExchangePane.getSelectedAccount(), accountProperty().get(), securityComboBox.getValue(), priceField.getDecimal(), quantityField.getDecimal(), exchangeRate, datePicker.getValue(), memoTextField.getText(), fees);
transaction.setNumber(numberComboBox.getValue());
return attachmentPane.buildTransaction(transaction);
}
Aggregations