Skip to content

Commit

Permalink
PortfolioListView: Add column with balance of reference account
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pfalcon authored and buchen committed Dec 8, 2024
1 parent f8dc7d1 commit 062a65f
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public class Messages extends NLS
public static String ColumnAutoGenerate;
public static String ColumnBalance;
public static String ColumnBalance_Description;
public static String ColumnBalanceOfReferenceAccount;
public static String ColumnBaseCurrency;
public static String ColumnCapitalGains;
public static String ColumnCapitalGains_Description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ ColumnAutoGenerate = Auto-Generate

ColumnBalance = Balance

ColumnBalanceOfReferenceAccount = Balance of reference account

ColumnBalance_Description = Balance of the account including all transactions up until and including the current day. Transactions with dates in the future are not included.

ColumnBaseCurrency = Base Currency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ ColumnAutoGenerate = Automatick\u00E9 Generov\u00E1n\u00ED

ColumnBalance = Z\u016Fstatek

ColumnBalanceOfReferenceAccount = Z\u016Fstatek referen\u010Dn\u00EDho \u00FA\u010Dtu

ColumnBalance_Description = Z\u016Fstatek \u00FA\u010Dtu v\u010Detn\u011B v\u0161ech transakc\u00ED a\u017E do aktu\u00E1ln\u00EDho dne v\u010Detn\u011B. Transakce, jejich\u017E datum le\u017E\u00ED v budoucnosti, nejsou zahrnuty.

ColumnBaseCurrency = Z\u00E1kladn\u00ED m\u011Bna
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Auto-generer

ColumnBalance = Kontosaldo

ColumnBalanceOfReferenceAccount = Saldo p\u00E5 referencekonto

ColumnBalance_Description = Kontosaldo inklusive alle transaktioner frem til og med den aktuelle dag. Transaktioner med datoer i fremtiden er ikke inkluderet.

ColumnBaseCurrency = Basisvaluta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Automatisch erstellen

ColumnBalance = Kontostand

ColumnBalanceOfReferenceAccount = Saldo des Referenzkontos

ColumnBalance_Description = Kontostand aller Buchungen, einschlie\u00DFlich des aktuellen Tages. Buchungen, die in der Zukunft liegen, werden nicht eingerechnet.

ColumnBaseCurrency = Basisw\u00E4hrung
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Generar autom\u00E1ticamente

ColumnBalance = Balance

ColumnBalanceOfReferenceAccount = Saldo de la cuenta de referencia

ColumnBalance_Description = Saldo de la cuenta considerando todas las transacciones hasta el d\u00EDa de hoy incluido. Las transacciones futuras no se tienen en cuenta.

ColumnBaseCurrency = Moneda base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ ColumnAutoGenerate = Auto-G\u00E9n\u00E9rer

ColumnBalance = Solde

ColumnBalanceOfReferenceAccount = Solde du compte de r\u00E9f\u00E9rence

ColumnBalance_Description = Solde du compte incluant toutes les op\u00E9rations, y compris du jour courant. Les op\u00E9rations futures ne sont pas incluses.

ColumnBaseCurrency = Devise de base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Auto-Generato
ColumnBalance = Saldo
ColumnBalanceOfReferenceAccount = Saldo del conto di riferimento
ColumnBalance_Description = Saldo del conto incluse tutte le operazioni fino a oggi incluso. Le operazioni con data futura non sono incluse.
ColumnBaseCurrency = Valuta base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Automatisch aanmaken?
ColumnBalance = Saldo
ColumnBalanceOfReferenceAccount = Saldo referentierekening
ColumnBalance_Description = Saldo van de rekening inclusief alle transacties tot en met vandaag. Transacties waarvan de datum in de toekomst ligt, worden niet meegenomen in het saldo.
ColumnBaseCurrency = Basisvaluta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Generuj automatycznie

ColumnBalance = Saldo

ColumnBalanceOfReferenceAccount = Saldo rachunku referencyjnego

ColumnBalance_Description = Saldo rachunku obejmuj\u0105ce wszystkie transakcje do dnia bie\u017C\u0105cego w\u0142\u0105cznie. Transakcje, kt\u00F3rych data przypada w przysz\u0142o\u015Bci, nie s\u0105 uwzgl\u0119dniane.

ColumnBaseCurrency = Waluta bazowa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Gerar automaticamente

ColumnBalance = Saldo

ColumnBalanceOfReferenceAccount = Saldo da conta de refer\u00EAncia

ColumnBalance_Description = Saldo da conta, incluindo todas as transa\u00E7\u00F5es at\u00E9 (e incluindo) o dia atual. As transa\u00E7\u00F5es com data futura n\u00E3o s\u00E3o inclu\u00EDdas.

ColumnBaseCurrency = Moeda Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Gerar automaticamente

ColumnBalance = Saldo

ColumnBalanceOfReferenceAccount = Saldo da conta de refer\u00EAncia

ColumnBalance_Description = Saldo da conta, incluindo todas as transa\u00E7\u00F5es at\u00E9 (e incluindo) o dia atual. As transa\u00E7\u00F5es com data futura n\u00E3o s\u00E3o inclu\u00EDdas.

ColumnBaseCurrency = Moeda Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = \u0410\u0432\u0442\u043E-\u0413\u0435\u043D\u0435\u0440\u04

ColumnBalance = \u0411\u0430\u043B\u0430\u043D\u0441

ColumnBalanceOfReferenceAccount = \u041E\u0441\u0442\u0430\u0442\u043E\u043A \u043D\u0430 \u0441\u043F\u0440\u0430\u0432\u043E\u0447\u043D\u043E\u043C \u0441\u0447\u0435\u0442\u0435

ColumnBalance_Description = \u041E\u0441\u0442\u0430\u0442\u043E\u043A \u043D\u0430 \u0441\u0447\u0435\u0442\u0435, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0432\u0441\u0435 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438 \u0434\u043E \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0434\u043D\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E. \u0421\u0434\u0435\u043B\u043A\u0438, \u0434\u0430\u0442\u044B \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043C, \u043D\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u044E\u0442\u0441\u044F.

ColumnBaseCurrency = \u0411\u0430\u0437\u043E\u0432\u0430\u044F \u0412\u0430\u043B\u044E\u0442\u0430
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = Automatick\u00E9 generovanie
ColumnBalance = Zostatok
ColumnBalanceOfReferenceAccount = Zostatok referen\u010Dn\u00E9ho \u00FA\u010Dtu
ColumnBalance_Description = Zostatok \u00FA\u010Dtu vr\u00E1tane v\u0161etk\u00FDch transakci\u00ED do aktu\u00E1lneho d\u0148a vr\u00E1tane. Transakcie s d\u00E1tumami v bud\u00FAcnosti nie s\u00FA zahrnut\u00E9.
ColumnBaseCurrency = Z\u00E1kladn\u00E1 mena
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = \u81EA\u52A8\u751F\u6210

ColumnBalance = \u4F59\u989D

ColumnBalanceOfReferenceAccount = \u53C2\u8003\u8D26\u6237\u4F59\u989D

ColumnBalance_Description = \u622A\u81F3\u5F53\u65E5\u7684\u8D26\u6237\u4F59\u989D\uFF0C\u5305\u62EC\u6240\u6709\u8D26\u76EE\u3002\u4E0D\u5305\u62EC\u672A\u6765\u8D26\u76EE\u3002

ColumnBaseCurrency = \u57FA\u51C6\u8D27\u5E01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ ColumnAutoGenerate = \u81EA\u52D5\u751F\u6210

ColumnBalance = \u7D50\u9918

ColumnBalanceOfReferenceAccount = \u53C3\u8003\u5E33\u6236\u7D50\u9918

ColumnBalance_Description = \u5230\u76EE\u524D\u70BA\u6B62\u6240\u6709\u4EA4\u6613\u7684\u5E33\u6236\u9918\u984D\uFF0C\u5305\u62EC\u7576\u5929\u7684\u4EA4\u6613\u3002\u672A\u4F86\u65E5\u671F\u7684\u4EA4\u6613\u4E0D\u5305\u62EC\u5728\u5167\u3002

ColumnBaseCurrency = \u57FA\u790E\u8CA8\u5E63
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.text.MessageFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

import jakarta.annotation.PostConstruct;
Expand Down Expand Up @@ -256,6 +258,21 @@ public String getText(Object element)
}));
portfolioColumns.addColumn(column);

column = new Column("ref_cash_bal", Messages.ColumnBalanceOfReferenceAccount, SWT.RIGHT, 100); //$NON-NLS-1$
column.setLabelProvider(new ColumnLabelProvider()
{
@Override
public String getText(Object element)
{
Portfolio p = (Portfolio) element;
var refAcc = p.getReferenceAccount();
return Values.Amount.format((refAcc.getCurrentAmount(LocalDateTime.now().with(LocalTime.MAX))));
}
});
ColumnViewerSorter.create(o -> ((Portfolio) o).getReferenceAccount()
.getCurrentAmount(LocalDateTime.now().with(LocalTime.MAX))).attachTo(column);
portfolioColumns.addColumn(column);

column = new NoteColumn();
column.getEditingSupport().addListener(this);
portfolioColumns.addColumn(column);
Expand Down

0 comments on commit 062a65f

Please sign in to comment.