Report

Liabilities

Shows a piechart with the Liabilities balance at a given time

A pie chart of the liability accounts' balances at a date, largest first, with the smallest slices merged into Other. It is the liability side of the Asset Piechart. In GnuCash: Reports ▸ Assets & Liabilities ▸ Liability Piechart.

The options that matter are Accounts/Accounts, General/End Date and Display/Maximum Slices. A report with no liability balance shows a No data warning.

Examples

Example: with a copy of the reports/category-liability 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":"Liabilities","options":{"Accounts":{"Accounts":["a0000000000000000000000000000002"]},"General":{"End Date":{"absolute":"2017-05-31"}}}}}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "title": "Liabilities",
    "sections": [
      {
        "blocks": [
          {
            "kind": "chart",
            "type": "pie",
            "title": [
              "Liabilities",
              "Balance at 05/31/17: $55.00"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Command line

red-ale exec --book book.gnucash report.run '{"report":"Liabilities","options":{"Accounts":{"Accounts":["a0000000000000000000000000000002"]},"General":{"End Date":{"absolute":"2017-05-31"}}}}'

It prints:

{
  "title": "Liabilities",
  "sections": [
    {
      "blocks": [
        {
          "kind": "chart",
          "type": "pie",
          "title": [
            "Liabilities",
            "Balance at 05/31/17: $55.00"
          ],
          "…": "…"
        },
        "…"
      ],
      "…": "…"
    },
    "…"
  ],
  "…": "…"
}

MCP tool call

Tool call:

{"name":"report.run","arguments":{"report":"Liabilities","options":{"Accounts":{"Accounts":["a0000000000000000000000000000002"]},"General":{"End Date":{"absolute":"2017-05-31"}}}}}

Result:

{
  "structuredContent": {
    "title": "Liabilities",
    "sections": [
      {
        "blocks": [
          {
            "kind": "chart",
            "type": "pie",
            "title": [
              "Liabilities",
              "Balance at 05/31/17: $55.00"
            ],
            "…": "…"
          },
          "…"
        ],
        "…": "…"
      },
      "…"
    ],
    "…": "…"
  }
}

Template GUID: 3fe6dce77da24c66bdc8f8efdea7f9ac · Script: standard/account-piecharts.rhai

Options

Accounts

  • Accounts (accountList, default []): Report on these accounts, if chosen account level allows.
  • Levels of Subaccounts (multichoice, default 2): Maximum number of levels in the account tree displayed.

Display

  • Show long names (boolean, default false): Show the full account name in legend?
  • Show Totals (boolean, default true): Show the total balance in legend?
  • Show Percents (boolean, default true): Show the percentage in legend?
  • Maximum Slices (numberRange, default 7): Maximum number of slices in pie.
  • Plot Width (plotSize, default {"percent":100}): Width of plot, 10 - 100 in percent, above in pixels.
  • Plot Height (plotSize, default {"percent":100}): Height of plot, 10 - 100 in percent, above in pixels.
  • Sort Method (multichoice, default "amount"): Choose the method for sorting accounts.

General

  • Report name (string, default "Liabilities"): 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.
  • End Date (date, default {"relative":"end-accounting-period"}): Select a date to report on.
  • Report's currency (currency, default "CURRENCY::USD"): Select the currency to display the values of this report in.
  • Price Source (multichoice, default "pricedb-nearest"): The source of price information.