General Journal
The General Journal report.
Every transaction in the book that is not void, oldest first, in journal form: its date and description and each of its splits with the account and the debit or credit. Use it to read the book in the order things were posted. It takes only a title: there are no date or account options, so on a large book the result is large. For particular accounts and dates use the General Ledger or the Transaction Report. In GnuCash: Reports ▸ Assets & Liabilities ▸ General Journal.
Examples
Example: with a copy of the reports/reconcile example book open as book.gnucash, at 2024-03-15T12:00:00Z.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"report.run","params":{"report":"General Journal"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"title": "General Journal",
"sections": [
{
"blocks": [
{
"kind": "table",
"rows": [
"…",
"…",
{
"role": "data",
"cells": [
null,
null,
{
"text": "Root:Asset:Bank",
"…": "…"
},
{
"display": "$29.00",
"…": "…"
},
null
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash report.run '{"report":"General Journal"}'
It prints:
{
"title": "General Journal",
"sections": [
{
"blocks": [
{
"kind": "table",
"rows": [
"…",
"…",
{
"role": "data",
"cells": [
null,
null,
{
"text": "Root:Asset:Bank",
"…": "…"
},
{
"display": "$29.00",
"…": "…"
},
null
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
MCP tool call
Tool call:
{"name":"report.run","arguments":{"report":"General Journal"}}
Result:
{
"structuredContent": {
"title": "General Journal",
"sections": [
{
"blocks": [
{
"kind": "table",
"rows": [
"…",
"…",
{
"role": "data",
"cells": [
null,
null,
{
"text": "Root:Asset:Bank",
"…": "…"
},
{
"display": "$29.00",
"…": "…"
},
null
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
},
"…"
],
"…": "…"
}
}
Template GUID: 25455562bd234dd0b048ecc5a8af9e43 · Script: standard/general-journal.rhai
Options
Display
- Date (boolean, default
true): Display the date? - Num (boolean, default
false): Display the check number? - Description (boolean, default
true): Display the description? - Memo (boolean, default
true): Display the memo? - Account (boolean, default
true): Display the account? - Shares (boolean, default
false): Display the number of shares? - Lot (boolean, default
false): Display the name of lot the shares are in? - Price (boolean, default
false): Display the shares price? - Amount (multichoice, default
"double"): Display the amount? - Value (boolean, default
false): Display the value in transaction currency? - Running Balance (boolean, default
false): Display a running balance? - Totals (boolean, default
false): Display the totals?
General
- Report name (string, default
"General Journal"): Enter a descriptive name for this report. - Stylesheet (multichoice, default
"Default"): Select a stylesheet for the report. - Add options summary (multichoice, default
"never"): Add summary of options. - Title (string, default
"General Journal"): The title of the report.
__reg
- journal (internal, default
true) - double (internal, default
true) - debit-string (internal, default
"Debit") - credit-string (internal, default
"Credit")