- if (currency == null) return String.format("%,1.2f", amount);
- else return String.format("%s %,1.2f", currency, amount);
+ if (currency == null)
+ return String.format("%,1.2f", amount);
+ else
+ return String.format("%s %,1.2f", currency, amount);
+ }
+ public void propagateToAccount(@NonNull LedgerAccount acc) {
+ if (currency != null)
+ acc.addAmount(amount, currency);
+ else
+ acc.addAmount(amount);
+ }
+ public String getCurrency() {
+ return currency;
+ }
+ public float getAmount() {
+ return amount;