import net.ktnx.mobileledger.model.LedgerTransaction;
import net.ktnx.mobileledger.model.LedgerTransactionAccount;
import net.ktnx.mobileledger.utils.Globals;
+import net.ktnx.mobileledger.utils.Misc;
import java.text.ParseException;
import java.util.ArrayList;
public static ParsedLedgerTransaction fromLedgerTransaction(LedgerTransaction tr) {
ParsedLedgerTransaction
result = new ParsedLedgerTransaction();
- result.setTcomment("");
+ result.setTcomment(tr.getComment());
result.setTprecedingcomment("");
ArrayList<ParsedPosting> postings = new ArrayList<>();
public LedgerTransaction asLedgerTransaction() throws ParseException {
Date date = Globals.parseIsoDate(tdate);
LedgerTransaction tr = new LedgerTransaction(tindex, date, tdescription);
+ tr.setComment(Misc.trim(Misc.emptyIsNull(tcomment)));
List<ParsedPosting> postings = tpostings;