Repost Ledger Entries
You can now reverse and repost a Ledger Entry using the same idempotency key up to 10 times. This will create a chain to reversals and reposting that all share an idempotency key and the id
of each LedgerEntry
is unique.
Small improvements
updateLedger
and deleteLedger
gen-graphql
CLI command to support query generation for runtime Entriesdelete-custom-txs
, delete-ledger
, delete-schema
, and reverse-ledger-entry
to the <InlineLog />
CLInotEqualTo
and notIn
on StringFilter, to support filtering on LedgerEntry.type
Reverse Ledger Entries
reverseEntryLedger
mutation. This will post a new entry with the opposite amounts of an existing LedgerEntry
. It will also free up the idempotency key, and allow you to repost a new LedgerEntry
.reversalHistory
, reversalPosition
, reversedBy
and reverses
to traverse this chain.Small improvements
Balances over a period
The LedgerAccount
type now exposes balancesDuring
and balanceChangesDuring
fields for efficiently querying all hourly, daily or monthly balances in a specified time period. These can be used to display portfolio charts or generate trial balance reports.
query GetBalanceHistory(
$ledgerAccount: LedgerAccountMatchInput!
) {
ledgerAccount(ledgerAccount: $ledgerAccount) {
# Get monthly balances for a year
yearlyBalances: balancesDuring(
startTime: "2021"
duration: 12
granularity: monthly
) {
startTime
endTime
granularity
nodes {
at
amount {
currency {
code
}
amount
}
}
}
}
}
Learn more in the documentation.
Small Improvements