Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PortfolioListView: Add column with balance of reference account #4388

Conversation

pfalcon
Copy link
Contributor

@pfalcon pfalcon commented Dec 7, 2024

Thus, portfolio list view will now have complete information: securities account and its MTM balance, and reference account with its cash balance.

Thus, portfolio list view will now have complete information: securities
account and its MTM balance, and reference account with its cash balance.
@pfalcon
Copy link
Contributor Author

pfalcon commented Dec 7, 2024

#4325 (comment) describes a usecase. The patch has a non-externalized string.

@@ -256,6 +258,23 @@ public String getText(Object element)
}));
portfolioColumns.addColumn(column);

column = new Column("ref_cash_bal", "Balance of reference account", SWT.RIGHT, 100); //$NON-NLS-1$
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing translations

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should re-use the label from the account view: ColumnBalance

It works nicely in German: Depotvolumen vs. Kontostand

But maybe not so well in other languages.

column = new Column("ref_cash_bal", "Balance of reference account", SWT.RIGHT, 100); //$NON-NLS-1$
column.setLabelProvider(new ColumnLabelProvider()
{
CurrencyConverter converter = new CurrencyConverterImpl(factory, getClient().getBaseCurrency());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The converter is not used. The balance will be shown in the account currency. Is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The converter is not used. The balance will be shown in the account currency. Is this intended?

Yeah, it's clearly was a copy-paste issue, where label provider was initially copied from security balance column, but the getText() then was copied from AccountListView, leaving converter unused.

Thanks for taking care of the patch!

buchen pushed a commit that referenced this pull request Dec 8, 2024
Thus, portfolio list view will now have complete information: securities
account and its MTM balance, and reference account with its cash balance.

Issue: #4388
Signed-off-by: Paul Sokolovsky <[email protected]>
[added translations for new label; rebased to master]
Signed-off-by: Andreas Buchen <[email protected]>
@buchen
Copy link
Member

buchen commented Dec 8, 2024

I added the translations and merged the change.

@buchen buchen closed this Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants