Skip to content

Commit e4d6971

Browse files
committed
Use will input dividend cash in GBP instead of GBX.
1 parent 79a802f commit e4d6971

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/org/yccheok/jstock/gui/PortfolioManagementJPanel.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,9 +2919,6 @@ private void updateWealthHeader() {
29192919
_cash += dividend;
29202920
cash = _cash;
29212921

2922-
System.out.println("deposit = " + deposit);
2923-
System.out.println("dividend = " + dividend);
2924-
29252922
paperProfit = buyPortfolioTreeTableModel.getGainLossValue(localCurrency);
29262923
realizedProfit = sellPortfolioTreeTableModel.getGainLossValue(localCurrency);
29272924
}

src/org/yccheok/jstock/gui/charting/InvestmentFlowChartJDialog.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,13 @@ private void updateROITimeSeries() {
334334
} else if (type == Activity.Type.Sell) {
335335
amount += (activity.getAmount() * exchangeRate);
336336
} else if (type == Activity.Type.Dividend) {
337-
amount += (activity.getAmount() * exchangeRate);
337+
double dividend = (activity.getAmount() * exchangeRate);
338+
if (org.yccheok.jstock.portfolio.Utils.getStockCurrency(this.portfolioManagementJPanel.getPortfolioRealTimeInfo(), stockInfo.code).isGBX()) {
339+
// Use will input dividend cash in GBP instead of GBX.
340+
dividend = dividend * 100.0;
341+
}
342+
343+
amount += dividend;
338344
} else {
339345
assert(false);
340346
}

0 commit comments

Comments
 (0)