Package name.abuchen.portfolio.model

Examples of name.abuchen.portfolio.model.Account.addTransaction()


                    pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                    AccountTransaction.Type.DEPOSIT, amount));
                    break;
                case BUY:
                case TRANSFER_OUT:
                    pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                    AccountTransaction.Type.REMOVAL, amount));
                    break;
                case DEPOSIT:
                case REMOVAL:
                case INTEREST:
View Full Code Here


                case REMOVAL:
                case INTEREST:
                case TAXES:
                case FEES:
                    if (weight != Classification.ONE_HUNDRED_PERCENT)
                        pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), null, t.getType(), amount));
                    else
                        pseudoAccount.addTransaction(t);
                    break;
                default:
                    throw new UnsupportedOperationException();
View Full Code Here

                case TAXES:
                case FEES:
                    if (weight != Classification.ONE_HUNDRED_PERCENT)
                        pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), null, t.getType(), amount));
                    else
                        pseudoAccount.addTransaction(t);
                    break;
                default:
                    throw new UnsupportedOperationException();
            }
        }
View Full Code Here

        AccountTransaction umatched = new AccountTransaction(Dates.today(), security, //
                        AccountTransaction.Type.TRANSFER_OUT, 2);
        account.addTransaction(umatched);

        second.addTransaction(new AccountTransaction(Dates.today(), security, //
                        AccountTransaction.Type.TRANSFER_OUT, 2));

        List<Issue> issues = new CrossEntryCheck().execute(client);

        assertThat(issues.size(), is(1));
View Full Code Here

            else if (transaction.getSecurity() != null)
                transaction.setType(amount < 0 ? AccountTransaction.Type.FEES : AccountTransaction.Type.DIVIDENDS);
            else
                transaction.setType(amount < 0 ? AccountTransaction.Type.REMOVAL : AccountTransaction.Type.DEPOSIT);

            account.addTransaction(transaction);
        }

    }

    /* package */static class PortfolioTransactionDef extends CSVImportDefinition
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.