+ public ParsedLedgerTransaction toParsedLedgerTransaction() {
+ ParsedLedgerTransaction result = new ParsedLedgerTransaction();
+ result.setTcomment("");
+ result.setTprecedingcomment("");
+
+ ArrayList<ParsedPosting> postings = new ArrayList<>();
+ for (LedgerTransactionAccount acc : accounts) {
+ if (!acc.getAccountName().isEmpty()) postings.add(acc.asParsedPosting());
+ }
+
+ result.setTpostings(postings);
+ result.setTdate(Globals.formatIsoDate(date));
+ result.setTdate2(null);
+ result.setTindex(1);
+ result.setTdescription(description);
+ return result;
+ }