diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsController.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsController.java index fc4143e..47729e5 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsController.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsController.java @@ -71,8 +71,11 @@ private void filterData(final String searchKeyword, final Integer weekTarget) { transactionType, t.getShare().getStock().getSymbol(), t.getShare().getStock().getCompany(), - sharePrefix + t.getShare().getQuantity().floatValue() + " shares", - moneyPrefix + t.getCalculator().calculateTotal().floatValue() + " NOK", + sharePrefix + t.getShare().getQuantity().floatValue(), + moneyPrefix + t.getCalculator().calculateGross().floatValue(), + moneyPrefix + t.getCalculator().calculateCommission().floatValue(), + moneyPrefix + t.getCalculator().calculateTax().floatValue(), + moneyPrefix + t.getCalculator().calculateTotal().floatValue(), weekTarget.toString()); } }); diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsView.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsView.java index b55efd3..4a0300f 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsView.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/widgets/transactions/TransactionsView.java @@ -102,15 +102,22 @@ protected void initLayout() { * transaction. * @param shares the amount of shares gained or lost during this * transaction. - * @param nok the amount of money in NOK gained or lost during - * the transactions. + * @param gross the gross amount of NOK gained or lost upon + * transaction. + * @param commission the calculated commission fee for the transaction. + * @param tax the calculated tax for the transaction. + * @param totalChange the total amount of NOK gained or lost upon + * transaction. * @param week the week this transaction took place. */ public void addTransactionCard(final String type, final String symbol, final String companyName, final String shares, - final String nok, + final String gross, + final String commission, + final String tax, + final String totalChange, final String week) { VBox card = new VBox(); @@ -123,10 +130,14 @@ public void addTransactionCard(final String type, // Info Rows (+- shares, +- NOK) VBox infoBox = new VBox(); - Label textRow1 = new Label(shares); - Label textRow2 = new Label(nok); + Label textRow1 = new Label("Shares: " + shares); + Label textRow2 = new Label("Gross: " + gross); + Label textRow3 = new Label("tax: " + tax); + Label textRow4 = new Label("Comission fee : " + commission); + Label textRow5 = new Label("Total: " + totalChange + "NOK"); + - infoBox.getChildren().addAll(textRow1, textRow2); + infoBox.getChildren().addAll(textRow1, textRow2, textRow3, textRow4, textRow5); Region spacer = new Region(); VBox.setVgrow(spacer, Priority.ALWAYS);