Fixed issue #47 - history timestamp not updating.
Build and Test API / build-and-deploy (push) Successful in 1m42s
Details
Build and Test API / build-and-deploy (push) Successful in 1m42s
Details
This commit is contained in:
parent
7e7458c2f5
commit
df4737d0a5
|
|
@ -202,12 +202,12 @@ SQL",
|
|||
private AccountHistoryValueRecordItemResponse fetchValueRecordHistoryItem(in BaseHistoryItem item) {
|
||||
return util.sqlite.findOne(
|
||||
db,
|
||||
"SELECT vr.id, vr.type, vr.value, vr.currency FROM history_item_linked_value_record h " ~
|
||||
"SELECT vr.id, vr.type, vr.value, vr.currency, vr.timestamp FROM history_item_linked_value_record h " ~
|
||||
"LEFT JOIN account_value_record vr ON vr.id = h.value_record_id " ~
|
||||
"WHERE h.item_id = ?",
|
||||
(row) {
|
||||
auto obj = new AccountHistoryValueRecordItemResponse();
|
||||
obj.timestamp = item.timestamp;
|
||||
obj.timestamp = row.peek!string(4);
|
||||
obj.type = item.type;
|
||||
obj.valueRecordId = row.peek!ulong(0);
|
||||
obj.valueRecordType = row.peek!string(1);
|
||||
|
|
@ -222,13 +222,14 @@ SQL",
|
|||
private AccountHistoryJournalEntryItemResponse fetchJournalEntryHistoryItem(in BaseHistoryItem item) {
|
||||
return util.sqlite.findOne(
|
||||
db,
|
||||
"SELECT je.type, je.amount, je.currency, tx.id, tx.description FROM history_item_linked_journal_entry h " ~
|
||||
"SELECT je.type, je.amount, je.currency, tx.id, tx.description, tx.timestamp " ~
|
||||
"FROM history_item_linked_journal_entry h " ~
|
||||
"LEFT JOIN account_journal_entry je ON je.id = h.journal_entry_id " ~
|
||||
"LEFT JOIN \"transaction\" tx ON tx.id = je.transaction_id " ~
|
||||
"WHERE h.item_id = ?",
|
||||
(row) {
|
||||
auto obj = new AccountHistoryJournalEntryItemResponse();
|
||||
obj.timestamp = item.timestamp;
|
||||
obj.timestamp = row.peek!string(5);
|
||||
obj.type = item.type;
|
||||
obj.journalEntryType = row.peek!string(0);
|
||||
obj.amount = row.peek!ulong(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue