bkper 5.6.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -264,9 +264,6 @@ bkper transaction list -b abc123 -q 'on:2025' --limit 100
|
|
|
264
264
|
# Fetch the next transaction page
|
|
265
265
|
bkper transaction list -b abc123 -q 'on:2025' --limit 100 --cursor cursor_123
|
|
266
266
|
|
|
267
|
-
# Count transactions without listing them
|
|
268
|
-
bkper transaction count -b abc123 -q "account:'Capital' on:2025"
|
|
269
|
-
|
|
270
267
|
# Update a transaction
|
|
271
268
|
bkper transaction update tx_456 -b abc123 --amount 120.00 --description "Printer paper (corrected)"
|
|
272
269
|
|
|
@@ -289,6 +286,19 @@ bkper transaction untrash tx_456 -b abc123
|
|
|
289
286
|
bkper transaction merge tx_123 tx_456 -b abc123
|
|
290
287
|
```
|
|
291
288
|
|
|
289
|
+
### Counting transactions
|
|
290
|
+
|
|
291
|
+
To answer how many transactions match, use `transaction count` (one call per account, group, or period), never `transaction list`. Queries include drafts: add `is:posted` for posted only. Trashed transactions are excluded unless `is:trashed`.
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
bkper transaction count -b abc123 -q "account:'Capital' on:2025 is:posted" # {"count":N}
|
|
295
|
+
bkper transaction count -b abc123 -q "group:'Equity' on:2025 is:posted"
|
|
296
|
+
|
|
297
|
+
# Accounts directly in a group, to count per account
|
|
298
|
+
GROUP_ID=$(bkper group get 'Equity' -b abc123 | jq -r '.id')
|
|
299
|
+
bkper account list -b abc123 | jq -r --arg g "$GROUP_ID" '.items[] | select(any(.groups[]?; .id == $g)) | .name'
|
|
300
|
+
```
|
|
301
|
+
|
|
292
302
|
<details>
|
|
293
303
|
<summary>Command reference</summary>
|
|
294
304
|
|
|
@@ -296,7 +306,7 @@ bkper transaction merge tx_123 tx_456 -b abc123
|
|
|
296
306
|
- `transaction list -b <bookId> -q <query>` - List transactions matching a query (auto-paginates through all results unless `--limit` or `--cursor` is provided)
|
|
297
307
|
- `--limit <number>` - Fetch one page with up to this many transactions
|
|
298
308
|
- `--cursor <cursor>` - Cursor for fetching the next page
|
|
299
|
-
- `transaction count -b <bookId> [-q <query>]` - Count transactions matching a query, returning `{"count":N}`; counts all transactions when `-q` is omitted
|
|
309
|
+
- `transaction count -b <bookId> [-q <query>]` - Count transactions matching a query, returning `{"count":N}`; counts all transactions when `-q` is omitted
|
|
300
310
|
- `transaction create -b <bookId>` - Create a transaction
|
|
301
311
|
- `--date <date>` - Transaction date
|
|
302
312
|
- `--amount <amount>` - Transaction amount
|