GitHub
Problems

Problems

Ledgeline checks your whole journal in the background every time it loads. The checks look for mistakes hledger would reject, and for things hledger accepts that are probably not what you meant.

Where problems show up

When there is at least one finding, a warning triangle with a count appears in the top bar. Its colour follows the worst finding: red for an error, amber for a warning, blue for information. A clean journal shows no triangle at all.

The right-hand end of the top bar, with the problems triangle and its count of 6 circled

Click the triangle to open the Problems drawer. Findings are grouped by check, with a count beside each group.

The Problems drawer open over the journal, listing six findings grouped by check

Most findings point at a transaction. Click one and Ledgeline closes the drawer, opens the Journal, scrolls to that transaction and pulses it. If the transaction falls outside the current date filter, the range widens just enough to include it. Account and search filters stay as they are, so clear them if the row doesn’t appear.

A few findings are about an account instead of a transaction. Those show the account name and aren’t clickable.

Two findings also carry a fix button under them, when the journal can be edited: Find match on In transit and Unlink on Broken match.

In the journal table, a flagged transaction has a coloured dot before its description. Hover the dot to read the findings.

The checks run on the whole journal, whatever the filter bar says.

The checks

CheckSeverityAnchored to
Unbalancederrortransaction
Balance assertionerrortransaction
Automatic posting ruleerrortransaction
Unknown account in a rulewarningaccount
Unknown account tag valuewarningaccount
Startup metric role on the wrong typewarningaccount
Customer name variantswarningtransaction
Recurring revenue moved to deferredinfotransaction
Stock checkswarningtransaction
Pendingwarningtransaction
Uncategorizedwarningtransaction
Negative cash balancewarningaccount
Missing descriptioninfotransaction
Future dateinfotransaction
In transitinfotransaction
Broken matchwarningtransaction
Unusual clearing postinginfotransaction
Recognition file includedwarningtransaction
Duplicate recognition entrywarningtransaction
Schedule total mismatchwarningtransaction
Schedule without a rule or sourceinfotransaction
Due in a closed periodwarningtransaction
Undeclared account in a schedulewarningaccount

The first nine come from Ledgeline’s engine. If you point the app at a plain hledger-web server instead, those engine checks are missing, and Ledgeline runs a simpler balance check of its own.

Unbalanced

A transaction’s postings don’t sum to zero. The message says what is left over.

Ledgeline balances the way hledger does. A posting with a cost (10 AAPL @ $150) counts in the cost commodity. Real postings and [bracketed] virtual postings each balance on their own. (parenthesized) virtual postings don’t have to balance. Each group may leave out one amount, and two missing amounts in one group is also an error.

To fix it, correct the amount that is wrong, or leave one posting’s amount blank so hledger fills it in.

Balance assertion

A posting asserts a balance (assets:checking $-20 = $880) and the account’s running balance at that point is different. The message shows the asserted balance, the calculated balance and the difference.

Usually a transaction is missing, duplicated or entered with the wrong amount before that date. Find the difference, then fix the transaction that causes it. Change the assertion only if the assertion itself was wrong.

Automatic posting rule

With --auto on, an = rule would make hledger refuse the journal at this transaction. Either the rule’s postings don’t balance, or a rule with an amountless posting fired more than once here. The message names the rule and its file and line. See Automatic postings for how to fix each.

Unknown account in a rule

An = rule posts to an account that no account directive declares and no transaction uses. It is usually a typo. Correct the rule, or declare the account if it is new on purpose. See Automatic postings.

Unknown account tag value

An account directive uses one of Ledgeline’s account tags with a value it doesn’t recognize. Ledgeline ignores the tag and falls back to its default, and the message says what that changes:

TagAccepted valuesWhat happens when the value is wrong
type:A, L, E, R, X, C, V, G, or Asset, Liability, Equity, Revenue, Expense, Cash, Conversion, GainThe type is guessed from the account name.
issection:revenue, cogs, opex, depreciation, interest, tax, otherThe account goes to its default P&L section.
cfsection:operating, investing, financing, cashThe account goes to its default cash flow section.
bsterm:current, noncurrentThe account gets the default balance sheet grouping.
holdings:stocks, other, noneThe account lands on a Holdings tab by whether it holds a non-currency commodity.
valuation:cost, unrealized, depreciation, adjustmentThe account counts as cost basis, so any unrealized gain on that holding reads as zero.
kpi:recurring, usage, deferred-revenue, sales-marketing, rnd, ga, receivable, payable, prepaidThe account has no role in the startup metrics or in revenue and expense recognition, so the figures that need it leave it out or hide.

The valuation: case matters most, because a zero gain looks like a holding that hasn’t moved. Fix the spelling in the account directive. An empty value (; bsterm:) counts as no tag and is not reported.

The same warning appears for a correctly spelled tag on an account of the wrong statement, because the tag is ignored there:

TagIgnored onWhy
issection:, isgroup:asset, liability and equity accountsThe income statement only shows revenue and expense accounts.
bsgroup:, bsterm:revenue and expense accountsThe balance sheet only shows asset, liability and equity accounts.
cfsection:, cfgroup:revenue and expense accountsThe cash flow statement counts those accounts only through net income.

The type that decides this is the account’s effective type, declared or guessed from its name. Remove the tag, or move it to the account it was meant for.

A type that looks like a typo

The same group also warns when an account’s declared type: disagrees with its name and with one more piece of evidence. For example:

account expenses:ga        ; type:A, issection:opex, isgroup:G&A
account expenses:ga:rent   ; type:X

The message names the account, the type you wrote, the evidence and the file and line of the directive:

account ‘expenses:ga’ is declared type: A (asset), but its name reads as an expense, its subaccounts are declared type: X (expense), and it carries issection: and isgroup:, which only income-statement accounts use. Did you mean type: X? … (declared at books.journal:11)

It warns only when the name’s type differs from the declared type, and at least one of these is also true:

A disagreement with the name alone is not reported, because it is often deliberate. expenses:prepaid ; type: A is not reported, and neither is a parent whose subaccounts have mixed types. Cash, Gain and Conversion count as Asset, Revenue and Equity, so assets:bank ; type: C is not a disagreement.

This warning is advice. Ledgeline still classifies the account by the type you declared, so until you fix it the account appears on the balance sheet, and anything posted to it directly, including a projection, is booked as an asset. When this warning fires, the separate “tag is ignored” warnings for the same account are left out, since fixing the type fixes those too.

The tags are explained on Accounts, Balance sheet, Income statement and Holdings.

Startup metric role on the wrong type

An account’s kpi: tag doesn’t fit its type. Each role expects one kind of account:

kpi:Expected type
recurring, usageRevenue
deferred-revenue, payableLiability
sales-marketing, rnd, gaExpense
receivable, prepaidAsset

For example, kpi: recurring on expenses:software counts a cost as subscription revenue. The startup metrics still read the account in the role you gave it, so the figures are wrong until you fix it. The type that decides this is the account’s effective type, declared or guessed from its name, and Cash counts as Asset. Usually the tag is on the wrong account, or the account’s type: is wrong. Move the tag, or fix the type in Settings → Accounts.

Only an account that declares kpi: itself is checked. A subaccount that inherits the role from its parent never triggers it, and neither does an account Ledgeline treats as a receivable or payable only because of its name. See Startup metrics.

Customer name variants

Two or more customer: values look like the same customer spelled differently. Ledgeline compares them after lowercasing, removing punctuation and spaces, and dropping a trailing legal suffix: inc, llc, ltd, corp, co, gmbh, plc, sa or bv. So Contoso Ltd, Contoso Ltd. and contoso are reported together. Acme and Acme Labs are not, because they differ by more than a suffix. The suffix has to be a separate word, so Acme Co reads as acme but Costco stays costco.

The finding lists every spelling in the group, with the date and description of one transaction for each, and points at the first of them. The startup metrics count each spelling as its own customer, so one customer can read as a churn in one month and a new customer in the next. Pick one spelling and change the others, or give every variant the same customer-id: tag.

Recurring revenue moved to deferred

A transaction debits an account tagged kpi: recurring and credits one tagged kpi: deferred-revenue. That is the “invoice to revenue, then move to deferred revenue” pattern. It is valid bookkeeping, and MRR still comes out right. But any customer: tag on the invoice is then on billings, not recognised revenue, so the startup metrics can’t build per-customer figures from it.

The finding is reported once per recurring account. It points at the first such transaction, and the message gives how many there are. To get customer metrics, tag the recognition entries with customer: instead, or invoice straight to deferred revenue. See Deferred revenue books.

Stock checks

Three checks come from the same engine as the Holdings tab, so the two always agree:

These checks cover the whole journal, including transactions dated in the future.

Pending

The transaction is marked pending with !. Pending usually means “not yet confirmed by the bank”. Once it clears, mark it cleared: click its status badge, or press s with the row under the cursor until it shows *.

Uncategorized

A posting goes to an account that was never categorized. The check flags:

“Top-level income or expense” is decided by account type, so it works for charts of accounts rooted at other names, like cogs. Recategorize the posting by clicking its account chip in the journal, or press c on the row.

hledger’s CSV import writes expenses:unknown and income:unknown when no rule matched, so this check also finds imported rows that still need a category. A rule in your rules file fixes future imports. See Imports.

Negative cash balance

A cash account’s balance is below zero today. A negative bank balance is either an overdraft or a booking mistake, such as a payment recorded against the wrong account or a missing deposit.

This check uses the same accounts as the Balances tab of the journal’s insights panel. A red row there always has a finding here. Liabilities are not checked, because a negative liability balance means you owe money, which is normal. Accounts tagged bsterm: noncurrent are excluded.

Missing description

The transaction has no description. Click the description cell or press e to add one.

Future date

The transaction is dated after today. That is fine for scheduled payments. Otherwise it is usually a typo in the year or month.

In transit

A posting on a clearing account is more than 10 days old and Find Matches has no partner to propose for it. The other half of the transfer was never imported, or a rule sent it somewhere else, or it was paid out in several pieces.

Click Find match under the finding. Ledgeline goes to the transaction in the journal and opens Find match on it, which shows every exact partner at any date, combinations that add up, and nearby postings you can pick by hand. If the other half was never imported, import the missing statement or fix the rule. If the posting really has no other half, click Ignore this side there. See Transfer matching.

Broken match

A match: id isn’t a valid link: it’s on only one posting, on postings in different clearing accounts or in one transaction, on a posting outside a clearing account, or on postings that no longer add up to zero. Usually one half of a linked transfer was edited or deleted after it was linked.

Click Unlink under the finding, then Unlink again to confirm. That removes the broken match: id from every posting that carries it, and the transactions are otherwise left as they are. Then match them again. See Transfer matching.

Unusual clearing posting

A posting on a clearing account has a cost (@) or a balance assertion, so Find Matches can never pair it. Move the cost or assertion to the real account’s posting.

The next six checks run only when the revenue and expense recognition helpers are on. They compare the journal with the schedules in the recognition file.

Recognition file included

The journal includes the recognition file. hledger and the Budget tab then read every schedule as a budget goal. Ledgeline doesn’t load the file a second time and keeps every recognition rule out of the budget, but hledger itself will still count them. Remove the include line, and read the file with -f next to the journal instead. See The recognition file.

Duplicate recognition entry

Two or more transactions carry the same recognition: and recognized: values, so each is the entry for the same schedule and period. The period’s revenue (or expense) is counted twice. Each copy is flagged. Delete all but one.

Schedule total mismatch

A schedule no longer adds up. Either its rules, posted entries and adjustments don’t sum to the deferred line they spread, or a posted entry’s amount differs from its rule’s. This usually means the source transaction or an entry was edited outside Ledgeline. Open the source transaction in the editor and save the schedule again. The restatement preview shows what it will rewrite.

Schedule without a rule or source

A schedule id is incomplete. Either a posted entry or a source posting names an id with no rule in the recognition file, or a rule’s id has no source posting carrying recognition: with that id. Usually the recognition file was edited, replaced or not committed alongside the journal. Restore the rules, or open the source in the editor and set up the schedule again. This is information, not an error, because the entries already posted are real transactions and count as they are.

Due in a closed period

An entry fell due on or before the ledger’s closed-through date and was never posted. Ledgeline won’t post into a closed month. Post it from the Recognition overlay’s closed-period row, which writes one adjustment dated today. See Closed periods.

Undeclared account in a schedule

A recognition rule posts to an account that no account directive declares. hledger check with strict account checking would refuse the entries it generates. Declare the account, or correct the rule’s account in the editor.