]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
add database support for transaction-level comments
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index b31ddef396741d50971c2716de52a6e4ab4a5d81..9d417955dbe259040f54995d9441edb791ddfea3 100644 (file)
@@ -292,10 +292,12 @@ public final class MobileLedgerProfile {
         db.execSQL("DELETE from transaction_accounts WHERE profile = ? and transaction_id=?",
                 new Object[]{uuid, tr.getId()});
 
-        db.execSQL("INSERT INTO transactions(profile, id, date, description, data_hash, keep) " +
-                   "values(?,?,?,?,?,1)",
+        db.execSQL(
+                "INSERT INTO transactions(profile, id, date, description, comment, data_hash, " +
+                "keep) " +
+                "values(?,?,?,?,?,?,1)",
                 new Object[]{uuid, tr.getId(), Globals.formatLedgerDate(tr.getDate()),
-                             tr.getDescription(), tr.getDataHash()
+                             tr.getDescription(), tr.getComment(), tr.getDataHash()
                 });
 
         for (LedgerTransactionAccount item : tr.getAccounts()) {