]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedLedgerTransaction.java
more pronounced day/month delimiters in the transaction list
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / json / v1_14 / ParsedLedgerTransaction.java
index 5b9b399b30406e6211aa9edf667c02be62e8efe9..6c8841595e15989922ff6b74beafef2c598f6775 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2020 Damyan Ivanov.
+ * Copyright © 2021 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -48,7 +48,7 @@ public class ParsedLedgerTransaction implements net.ktnx.mobileledger.json.Parse
     public static ParsedLedgerTransaction fromLedgerTransaction(LedgerTransaction tr) {
         ParsedLedgerTransaction
                 result = new ParsedLedgerTransaction();
-        result.setTcomment(tr.getComment());
+        result.setTcomment(Misc.nullIsEmpty(tr.getComment()));
         result.setTprecedingcomment("");
 
         ArrayList<ParsedPosting> postings = new ArrayList<>();
@@ -59,7 +59,7 @@ public class ParsedLedgerTransaction implements net.ktnx.mobileledger.json.Parse
         }
 
         result.setTpostings(postings);
-        SimpleDate transactionDate = tr.getDate();
+        SimpleDate transactionDate = tr.getDateIfAny();
         if (transactionDate == null) {
             transactionDate = SimpleDate.today();
         }