There are three ways to compute days sales outstanding (DSO) on my NetSuite test account, and they give three different answers: 26 days, 56 days, and 135 days. All three are arithmetically correct. Only one of them is true, and it's the one nobody would want to put on a slide.
That's the kind of thing The Ledger X-Ray is built to find. It's one of the four free prompts that went into the Sonar AI Prompt Library in September, and of the four it's the one I'd hand to someone who has never seen the account before. It doesn't assume that you know which question to ask. It asks the questions itself, in order, and it shows its work.
If you're new to this, Sonar AI is an AI agent that runs inside NetSuite. Every prompt in the library is a playbook that I engineered and tested against live NetSuite data, and you run it inside your own account, against your own records. Nothing leaves the account, and nothing is written to it.
A Documentary in Five Acts
Most of the reports in the library look like reports. This one looks like a film. It's dark and typeset like a title sequence, and it's organized into five acts. I built it that way on purpose. The audience is a board or a lender, and the most useful thing a report can do for that audience is tell a story with a beginning, a turn, and a verdict.
Act I is the surface reading. On the test account, it's a company having a very good year. Q2 revenue of $3.31 million, up 29.5% over the prior year. Operating margin of 17.0%, up from 11.2%. Operating expenses down 1.2% while revenue grew. $2.62 million in cash and interest coverage of 73 times. Earnings before interest, taxes, depreciation, and amortization (EBITDA) comes in at $1.20 million year to date, and it ties to NetSuite's own income statement to the penny. If you stopped there, then you'd write the press release.
Act II asks a single question: who got invoiced?
Split the quarter's revenue by how it entered the ledger, and the picture fractures. Six manual journal entries, each with the memo "Beg Balance Entries," posted on the first of the month with no creator recorded, carry 81% of the quarter. The 108 invoices carry 18%. The 133 cash sales carry 1%.
The report calls these two things the ghost company and the real company, and I think that the names are earned. The journal book is $2.68 million a quarter with no customers and no invoices. It has posted every month since January 2025, it has created $1.24 million of accounts receivable that isn't tied to any invoice, and it would fail a day-one audit tie-out. The transactional book is 241 documents from 82 named customers, every dollar traceable. It's $624K for the quarter, up 89.8% over the prior year and 50.2% over the prior quarter, with the best month in the company's history in June 2026 and a backlog of 57 orders that is completely clean.
So the growth is real. It's just smaller than the ledger says, and it's sitting underneath something that isn't.
Where the Two Companies Collide
Act III is my favorite section, because this is where the balance sheet gives the game away. Journals that book revenue against receivables without ever creating an invoice leave fingerprints. Both control accounts on the test account carry a seven-figure balance that no subledger can explain. Accounts receivable shows $928K of real invoices next to $1.24 million of journal-created balance. Accounts payable shows $181K of real bills against $1.18 million of journal-created balance.
And inside the $928K of real receivables there's a second problem. Sixty percent of it is more than 90 days past due, including one invoice from May 2025 that has been open for fifteen months.
Which brings me back to the three DSOs. Divide real invoices by journal-inflated revenue and you get 26 days, which is flattering and wrong. Divide journal-swollen receivables by journal-swollen revenue and you get 56 days, which is internally consistent and hollow. Divide the real invoices by the organic revenue that created them and you get 135 days. The report labels the first one "misleading, do not present" and the third one "defensible, own this number." Meanwhile, the company pays its vendors in about eight days. It collects in 135 and pays in 8, which means that it's financing everyone else's working capital out of its own bank account.
The Number Lenders Ask For
Act IV builds EBITDA from net income, line by line, and validates it against NetSuite's native income statement with zero variance. Net income of $1,174,240.26, plus interest expense of $16,399.04 from the only interest account in the chart, plus $6,497.56 of depreciation from two accounts identified by name, equals $1,197,136.86. No income tax provision exists in the posted general ledger, and the report flags that for confirmation instead of assuming a pass-through entity.
There's a detail in this section that I like a lot. When the prompt scanned account names for anything containing "tax," it got exactly one hit: account 6460, "Taxi & Car Rental," with a balance that happens to be identical to the interest expense. It excluded the account and said so. That's the kind of false positive a person would catch and a naive query wouldn't, and the report treats catching it as part of the evidence.
The other thing Act IV notices is what's missing. Depreciation of $6.5K on an $8.4 million revenue company is 0.08% of revenue. Whoever owns the machines, it isn't this ledger.
Every Claim Has a Receipt
Act V is the appendix, and it's short, because each finding traces to one query run during the session against posting transactions only. The 81% journal finding comes from joining transaction accounting lines to transactions and accounts for the three Q2 periods, grouped by transaction type. The receivables gap comes from summing the A/R account and splitting it by type. The organic growth number is monthly income split journal-versus-other across 27 periods, and it rises steadily within the quarter, so there's no quarter-end loading. The EBITDA validation cites the report ID and the period criteria it ran with.
Nothing was estimated. The report says that on the cover and then proves it at the end.
The Verdict
The closing argument is one paragraph: a genuinely good business is growing inside a set of books that can't yet prove it. Then the advice splits three ways. Lead with the organic growth and the margin expansion, because those are auditable. Fix the journal regime and the control-account gaps and reserve the $559K of 90-plus-day receivables before anyone asks. Watch August 2026, which was the first negative cash month of the fiscal year, and watch gross margin, which slipped about two points quarter over quarter.
Every period in FY2026 was still open when this ran, so every figure is preliminary, and the report says so in the header.
Wrapping Up
The same test account, and the same journal finding, appears in the Instance Integrity Diagnostic, which went out in the same release. The two prompts are companions. The Diagnostic is an engagement report with a findings register and a remediation sequence. The X-Ray is the version you'd show to people who need to understand the situation in ten minutes. If you run one, then run the other.
The Ledger X-Ray is in the free tier of the library, so there's nothing to buy. The full sample report from the test account is online, and I covered the whole September release in a separate post.
On the test account, four out of five revenue dollars arrive by anonymous journal. Someone should be able to say what they are.