Eighty-one cents of every FY2025 revenue dollar were posted through twenty-four summary journals. The highest gross margin in the business — 56.7% — sits in the invoiced channel, one tenth of the total, and four invoices marked "TEST" account for every revenue spike of the year.
Thirteen recommendations follow, six on revenue and seven on cost, each sized in dollars or marked "unmeasured", with a named verification step. Assumptions are stated in Section 1 and Appendix C.
Split by posting source rather than by account, FY2025 revenue comprises four businesses with gross margins from 19.8% to 56.7%. The printed statement presents 4210 Revenue - Products as a single line of $10,063,960.01.
| Channel (posting source) | Revenue | Mix | Cost of sales | Gross profit | GM |
|---|---|---|---|---|---|
| Summary journals — product4210 via JE105–JE116, JE129–JE140; paired with 5310 Purchases | $8,820,845.12 | 81.4% | $5,542,303.76 | $3,278,541.36 | 37.2% |
| Invoiced (B2B, 367 invoices)4210 + 4450 via CustInvc; paired with 5340 via ItemShip | $1,176,828.91 | 10.9% | $509,396.64 | $667,432.27 | 56.7% |
| Services (summary journals)4310 via JE; paired with 5360 3rd Party Contracting | $767,029.94 | 7.1% | $614,785.59 | $152,244.35 | 19.8% |
| Cash sales (retail, 530 tickets)4210 + 4450 via CashSale; paired with 5340 via CashSale | $72,220.68 | 0.7% | $38,561.77 | $33,658.91 | 46.6% |
| Unassigned cost5340 via item receipts IR657 and IR660 (vendor Bedline) | — | — | $4,800.00 | ($4,800.00) | — |
| Total — agrees with Income Statement | $10,836,924.65 | 100.0% | $6,709,847.76 | $4,127,076.89 | 38.1% |
The summary journals are a summary import, not an allocation of revenue. Twenty-four journals memoed "Beg Balance Entries - Sub 1" and "- Sub 2", one per subsidiary per month, carry $9,587,875.06 of revenue (88.5%), $6,157,089.35 of cost of sales (91.8%) and $2,481,254.35 of operating expense (84.4%). The revenue is treated as real. The month-to-month cost relationships inside them are not relied upon; see Section 3.
Cost of sales is paired with revenue by posting origin. 5310 Purchases and 5360 3rd Party Contracting post only through the same journals as 4210 and 4310 and are paired with them. 5340 Cost of Sales posts from item fulfillments and cash sales and is paired with the invoiced and retail channels. 5360 runs at a near-fixed 11.1% of 5310 in every month, so the 19.8% services margin is a product of the allocation rather than a measurement.
The summary journals form a stable base between $670,066.68 and $801,166.68 a month. The three months that stand apart — May, September and December — are attributable entirely to the invoiced channel and, within it, to four invoices.
INV791 Mercury Co. $73,976 (May), INV788 Haskell Associates $41,356 (September), INV790 Global Information $101,799 and INV789 Gotter inc. $64,112 (December) total $281,243, or 23.9% of invoiced revenue. Each carries the memo "TEST — customer name", has two item lines, no item fulfillment, no cost of sales, and remains open, with $302,717.94 outstanding including tax. All four were entered in Subsidiary 1 with header location 03: Los Angeles Distribution Center. Excluding them, the invoiced channel ranges between $60,204.98 and $84,992.78 a month: May falls from $158,968.78 to $84,992.78, September from $124,737.33 to $83,381.33 and December from $239,847.86 to $73,936.86.
Eight corporate accounts ordered in eleven or twelve months of the year: Jones Manufacturing $178,652.46 (15.2% of invoiced product revenue), Design Excellence Ltd. $111,256.56, Panaderia Co. $101,643.89, Davis Supplies $101,488.06, Realpoint inc. $75,850.29, Recreational Outfitters $51,123.19, Hugo Limited $41,440.26 and Karmabit $39,651.34. Together they placed 93 invoices worth $701,106.05 — 59.8% of invoiced product revenue — with no identifiable acquisition cost. Eight always-on individual customers add $9,565.83. The remaining 25 accounts ordered in two to nine months and total $176,321.03 (15.0%). Four further one-month buyers — Ghetti Ltd $2,577, Schmidt & Sons Consulting $1,616, Jasper and Associates $339 and Kasson Ltd $241 — add $4,773.
If INV788–INV791 are test data, FY2025 revenue is $10,555,681.65, gross profit $3,845,833.89 (36.4%) and net income $882,589.67 (8.4%); approximately one quarter of reported profit is not supported by shipments. If they are genuine orders, $302,717.94 has been receivable for nine to sixteen months with nothing shipped and no cost recorded. In either case the invoiced channel's margin on shipped business is 43.1% on $895,585.91, not 56.7%.
| FY2025 | Revenue | Gross profit | GM reported | GM excl. TEST | Invoiced channel |
|---|---|---|---|---|---|
| Q1 | $2,638,864.60 | $906,472.09 | 34.4% | 34.4% | $196,735.08 |
| Q2 | $2,597,442.90 | $1,027,684.01 | 39.6% | 37.8% | $296,711.62 |
| Q3 | $2,656,449.18 | $990,740.04 | 37.3% | 36.3% | $289,953.71 |
| Q4 | $2,944,167.97 | $1,202,180.75 | 40.8% | 37.3% | $393,428.50 |
| FY2025 | $10,836,924.65 | $4,127,076.89 | 38.1% | 36.4% | $1,176,828.91 |
The apparent margin expansion from Q1 to Q4 (34.4% to 40.8%) is largely the TEST invoices, which carry no cost: excluding them the year runs between 34.4% and 37.8%.
367 invoices averaged $3,196.21 (median $249.99); 530 cash sales averaged $132.28 (median $69.99). Direct revenue by location: 03: Los Angeles Distribution Center $537,394.69; 05: Miami $305,735.33; 01: San Francisco Store $66,135.83 ($41,063.71 cash sales, $25,072.12 invoiced); 02: New York Store $53,767.74 ($31,156.97 and $22,610.77); $286,016 of one-month invoices carry no line location. Freight was charged at a flat $3.99 on every cash sale ($2,114.70) and $8.50 on 300 invoices, $10.00 on 50, $90.00 on 8 and $50.00 on 1 ($3,820.00 on 359 of 367 invoices) — $5,934.70 in total, unchanged across the year, against 358 item fulfillments and an account 6080 Freight-out that exists but has never been posted to.
Indexed to January = 100, forty-two of the forty-six operating expense accounts — and 8100 Interest Expense — trace the same twelve-point curve: 100, 78.3, 75.5, 94.7, 98.0, 105.9, 106.9, 86.7, 80.5, 95.5, 104.6, 121.3.
$1,484,104.94 of operating expense — 50.5% — cannot be managed as posted. Travel, IT and telecom, marketing, insurance, professional and outside services, facilities other than rent, training, recruitment, sick leave, dues, bank charges, contributions and amortisation rise and fall together by the same percentage each month. The five accounts fed by vendor bills (Dell US, Brocade Communications Systems US, Staples US, XCOM US and CDW US, 24 bills each) follow the same curve, which indicates the bills were generated from the factor rather than the factor from the bills. Reducing any of these lines changes a formula, not a cost.
Three exact-ratio indicators. 8100 Interest Expense equals 6460 Taxi & Car Rental to the cent — $24,694.63 in FY2025 and $17,092.66 in Jan–Aug 2026 — while the Dec 2025 balance sheet carries no borrowing. The four telephone sub-accounts hold fixed proportions all year (Regular Service $81,028.44 : Internet $48,617.57 : Cellular $32,411.71 : Online Fees $64,823.43 = 2.5 : 1.5 : 1 : 2). 6060 Advertising, billed by one vendor, FrisCo US, in 24 bills, is exactly 2.6087% of that month's journal product revenue in every month ($230,109.00 in total).
Four accounts move independently. 6210 Salaries & Wages $971,755.70 steps in multiples of 5% of January; 6230 Payroll Expenses $102,539.95 tracks wages; 6610 Rent $150,040.00 was $12,100 a month through August and $13,310 from September (a 10% step, $14,520 annualised); and 6060 Advertising as described. Together they are $1,454,444.65, the other half of operating expense.
Ratios the ledger supports. IT and telecom is 33.4% of wages and telephone alone 23.3%. Travel and entertainment is 29.2% of wages; accommodation ($95,691.74) runs 1.55 times airfare ($61,736.62), consistent with long trips rather than frequent ones. Sick leave is 4.8% of wages. Advertising plus marketing is $446,187.13 — 4.1% of total revenue but 35.7% of the $1,249,049.59 of revenue that came through invoices and stores, the only revenue an advertising dollar could plausibly influence. Rent is 51.9% of facilities cost. No headcount or unit volumes exist in the ledger; nothing per employee or per unit is claimed.
The two subsidiaries run the same journal structure at the same margin. The difference in their results — $815,711.29 against $348,121.38 — is the direct channel, and the four TEST invoices sit entirely in Subsidiary 1.
| FY2025 | Subsidiary 1 | Subsidiary 2 | Consolidated |
|---|---|---|---|
| Revenue | $5,987,948.32 | $4,848,976.33 | $10,836,924.65 |
| of which summary journals (4210 + 4310) | $5,046,250.06 | $4,541,625.00 | $9,587,875.06 |
| of which direct (invoiced, cash, freight) | $941,698.26 15.7% of revenue | $307,351.33 6.3% of revenue | $1,249,049.59 |
| Journal gross margin (4210+4310 less 5310+5360) | 35.8% | 35.8% | 35.8% |
| Direct gross margin (direct revenue less 5340) | 60.5% 43.7% excl. TEST | 41.2% | — |
| Gross margin, total | 39.7% | 36.1% | 38.1% |
| Operating expense (% of revenue) | $1,546,532.04 (25.8%) | $1,392,017.55 (28.7%) | $2,938,549.59 (27.1%) |
| Net income (margin) | $815,711.29 (13.6%) | $348,121.38 (7.2%) | $1,163,832.67 (10.7%) |
| Net income excluding TEST invoices | $534,468.29 (9.4%) | $348,121.38 (7.2%) | $882,589.67 (8.4%) |
Every allocated pool splits between the subsidiaries in the same proportion as the journals themselves — advertising 52.6 : 47.4, wages 52.6 : 47.4, travel 52.9 : 47.1, IT 52.9 : 47.1, interest 52.9 : 47.1 — and rent is $75,020.00 in each. Subsidiary 2 therefore carries operating expense at 28.7% of revenue not because it spends more but because it has less direct revenue over which to spread the same factor. Subsidiary 2's direct business is 05: Miami ($305,735.33, including $357.00 of freight) plus one invoice of $1,616; Subsidiary 1 holds Los Angeles, both stores and all four TEST invoices. Excluding the TEST invoices, the net income gap narrows from $467,589.91 to $186,346.91.
Jan–Aug 2026 against the same eight months of 2025: revenue up 18.7%, gross margin up 2.9 points, operating expense up 8.7%; net income up 85.6%. Receivables rose 61.4% and inventory 109.4% since Dec 2025.
| Jan–Aug | 2025 | 2026 | Change |
|---|---|---|---|
| Revenue | $6,939,570.56 | $8,238,204.20 | +18.7% |
| Cost of sales | $4,365,255.56 | $4,945,111.67 | +13.3% |
| Gross profit (GM) | $2,574,315.00 (37.1%) | $3,293,092.53 (40.0%) | +27.9% |
| Operating expense (% of revenue) | $1,913,464.38 (27.6%) | $2,079,214.42 (25.2%) | +8.7% |
| Other expense | $16,048.00 | $17,017.16 | — |
| Net income (margin) | $644,802.62 (9.3%) | $1,196,785.95 (14.5%) | +85.6% |
Sixteen summary journals supply $6,940,541.72 of 2026 revenue (84.2%), so the mix finding stands. Accounts absent from FY2025 have begun to post — 4320 Sales Returns & Allowances $149.95, 5370 Stock Adjustment ($9,140.00), 5205 Purchase Price Variance $765.00, 6690 Bad Debt Expense $149.95, 6370 Legal Fees $2,000.00, 6250 Automobile Expense $2,000.00 — the first transaction-driven costs the ledger has shown.
Operating cycle at Dec 2025. Receivables $1,305,952.68 represent 44.0 days of revenue; inventory $1,001,084.33, 54.5 days of total cost of sales; payables $806,802.51, 43.9 days — a 54.6-day cycle holding $1,500,234.50 of net working capital, with cash of $2,262,964.25 covering 9.2 months of operating expense and no debt. Each ten days of DSO represents $296,902.05 of cash. Sales tax is payable in eight states at Dec 2025 ($113,747.53) and twelve at Aug 2026 ($217,882.59). Capital stock increased by $390,000.00 to $2,658,382.83 in 2026; retained earnings of $217,235.72 plus FY2025 net income equal the $1,381,068.39 shown at Aug 2026.
Interest expense with no debt. $24,694.63 of interest expense in FY2025 and $17,092.66 in 2026 against a balance sheet showing no borrowing until a $2,000.00 line of credit appears in 2026; both figures equal Taxi & Car Rental exactly.
Receivables the invoices do not explain. Of the $1,305,952.68 A/R at Dec 2025, $998,098.61 (76.4%) was posted by journals. Invoices net of payments contribute $307,854.07, of which $302,717.94 is the four TEST invoices, leaving $5,136.13 of genuinely open invoiced receivables. At Aug 2026 journals still carry $1,229,547.01 (58.3%) of the $2,108,404.79.
Sub-ledger caveat. Inventory in Stock stood at $1,001,084.33 at Dec 2025 against $552,758.41 of item-driven cost of sales (5340) for the year — 661 days of supply; at Aug 2026 it is $2,095,945.97 against a 2026 run rate implying 1,133 days. The journal-posted cost of sales in 5310 never relieves inventory, so the general ledger cannot establish whether the stock supports the wholesale business or sits beside it. The item sub-ledger (Inventory Valuation report) is the appropriate source.
INV788, INV789, INV790 and INV791 are $281,243 of 4210 revenue and $302,717.94 of open 1110 Trade Receivables with no shipment and no 5340 cost. If genuine, ship and collect; if test data, reverse and restate revenue to $10,555,681.65 and net income to $882,589.67. Until resolved, every direct-channel margin carries a 23.9% uncertainty.
They represent $701,106.05 of 4210 invoiced revenue on 93 invoices, order monthly, and carry no identifiable acquisition cost. A 10% increase in order value is $70,110.61 of revenue and approximately $30,232.68 of gross profit at the channel's 43.1% margin excluding the TEST invoices. Jones Manufacturing alone is 15.2% of the channel — a concentration to protect as well as grow.
Services earned $767,029.94 at 19.8% gross margin against 37.2% on product. Each five points of margin is $38,351.50 a year; matching the product margin would be $132,846.18. Because 5360 is a near-fixed 11.1% of 5310, the margin is an allocation output; the real delivery cost should be confirmed before price is changed.
They ordered in two to nine months of twelve and total $176,321.03 (15.0% of invoiced product revenue); Pineapple Republic ($76,760.96, nine months) is the largest. The ledger does not record why they did not order in the gap months, so the uplift is not sized.
Freight revenue was $5,934.70 on 897 orders — a flat $3.99 on all 530 cash sales and predominantly $8.50 on invoices — unchanged across the year, while 6080 Freight-out has no postings and 358 fulfillments were shipped. Either carriers are paid within the 5310 journals or freight cost is absent from the books.
530 cash sales at $132.28 average and $69.99 median, 46.6% gross margin, across two stores ($41,063.71 San Francisco, $31,156.97 New York). Ten dollars more per ticket is $5,300 a year — modest, but the highest-margin revenue after the invoiced channel.
Forty-two operating accounts worth $1,484,104.94 (50.5% of operating expense) and 8100 Interest Expense share one monthly index. They should be re-posted from source — payroll register, vendor bills, lease, carrier and telecom invoices — or, at minimum, the allocation basis should be documented in the journal memo. Every cost recommendation below is conditional on this one.
8100 Interest Expense is $24,694.63 in FY2025 and $17,092.66 in Jan–Aug 2026, equal to 6460 Taxi & Car Rental to the cent in both periods, with no borrowing on the Dec 2025 balance sheet. It appears to be a mis-mapped allocation line that understates operating expense and misstates other expense.
Travel and entertainment is $283,988.39 — 29.2% of wages — with accommodation at $95,691.74 running 1.55 times airfare and business meals at $55,562.95. A 10% reduction is $28,398.84. The figure is currently allocated, so no saving can be realised until the pool is posted from expense reports.
FrisCo US billed $230,109.00 across 24 bills — exactly 2.6087% of journal product revenue each month, which describes a fee formula rather than a media plan. With marketing the total is $446,187.13, or 35.7% of the $1,249,049.59 of revenue that came through invoices and stores.
$324,115.46 of IT and telecom is 33.4% of wages; telephone alone is $226,881.15 in four sub-accounts holding exact 2.5 : 1.5 : 1 : 2 proportions all year, which carrier invoices would not produce. The saving is unmeasurable until source documents replace the factor.
6610 Rent moved from $12,100 to $13,310 a month in September 2025, a 10% increase worth $14,520 a year, and is the only facilities line that moves independently of the factor. If the lease contains an escalator this is it; otherwise the step is unexplained.
Inventory in Stock rose from $1,001,084.33 to $2,095,945.97 between Dec 2025 and Aug 2026 — an additional $1,094,861.64 of cash on hand as stock. Measured against the only cost of sales that relieves it (5340), that is 661 days of supply rising to 1,133. Carrying cost is not recorded, so it is not sized.
| Report | Filters submitted | Header as rendered | Period verified | Used for |
|---|---|---|---|---|
| Income Statement (-200) | crit_1_mod = LFY (periods 156–170); crit_2 = -1 Consolidated; range = acctmonth | FY 2025, twelve monthly columns + Total | Yes | Monthly P&L, Figures 2 and 4, quarterly table |
| Income Statement (-200) | crit_1_mod = LFY; crit_2 = -1; range = all | FY 2025 | Yes | Account totals, P&L strip, pools |
| Income Statement (-200) | crit_1_mod = LFY; crit_2 = -1; range = subsid_sic | FY 2025, Subsidiary 1 / Subsidiary 2 / Total | Yes | Section 4 |
| Income Statement (-200) | crit_1_from = 156, crit_1_to = 165 (CUSTOM); crit_2 = -1 | From Jan 2025 to Aug 2025 | Yes | Section 5 comparison base |
| Income Statement (-200) | crit_1_from = 173, crit_1_to = 182 (CUSTOM); crit_2 = -1 | From Jan 2026 to Aug 2026 | Yes | Section 5 current period |
| Balance Sheet (-202) | crit_1_to = 170 (CUSTOM); crit_2 = -1 | End of Dec 2025 | Yes | Operating cycle, A/R decomposition |
| Balance Sheet (-202) | crit_1_to = 182 (CUSTOM); crit_2 = -1 | End of Aug 2026 | Yes | Balance-sheet strip |
Report runs were issued sequentially; each response carried periodVerified = true and a rendered header matching the requested period. Consolidated context (-1) includes Subsidiary 1, Subsidiary 2 and xElim; xElim recorded no P&L activity.
| Item | Printed report | Derived from GL / components | Difference |
|---|---|---|---|
| Total Income (channels, Section 1) | $10,836,924.65 | $10,836,924.65 | 0.00 |
| Total Cost of Sales (channels + unassigned) | $6,709,847.76 | $6,709,847.76 | 0.00 |
| 5340 Cost of Sales by posting source (ItemShip + CashSale + ItemRcpt) | $552,758.41 | $552,758.41 | 0.00 |
| Total Expense, 46 accounts, eleven pools | $2,938,549.59 | $2,938,549.59 | 0.00 |
| Net Income (Income − COGS − Expense − Other) | $1,163,832.67 | $1,163,832.67 | 0.00 |
| Monthly revenue totals, channels vs report (12 of 12) | 12 months | 12 agree | 0.00 |
| Subsidiary 1 + Subsidiary 2 revenue | $10,836,924.65 | $10,836,924.65 | 0.00 |
| Subsidiary 1 + Subsidiary 2 net income | $1,163,832.67 | $1,163,832.67 | 0.00 |
| Balance Sheet Dec 2025: Liabilities + Equity vs Assets | $4,570,001.26 | $4,570,001.26 | 0.00 |
| Balance Sheet Aug 2026: Liabilities + Equity vs Assets | $6,863,556.10 | $6,863,556.10 | 0.00 |
| Retained earnings roll (Dec 2025 RE + FY2025 NI = Aug 2026 RE) | $1,381,068.39 | $1,381,068.39 | 0.00 |
| A/R Dec 2025 (journals + invoices net of payments) | $1,305,952.68 | $1,305,952.68 | 0.00 |
| Transaction type | Transactions | GL lines | Net P&L effect | Accounts touched |
|---|---|---|---|---|
| Journal | 24 | 1,368 | $924,836.73 | 4210, 4310, 5310, 5360, 40 expense accounts, 8100 |
| CustInvc | 367 | 1,422 | $1,176,828.91 | 4210, 4450 |
| CashSale | 530 | 1,626 | $33,658.91 | 4210, 4450, 5340 |
| ItemShip | 358 | 1,047 | ($509,396.64) | 5340 |
| VendBill | 144 | 1,032 | ($457,295.24) | 6060, 6240, 6630, 6640, 6655, 6671 |
| ItemRcpt | 2 | 16 | ($4,800.00) | 5340 |
| Total | 1,425 | 6,511 | $1,163,832.67 | 53 accounts |
All queries are SuiteQL executed against the production account on 2026-09-18 with Administrator permissions. Period ids: FY2025 monthly periods are 156–158, 160–162, 164–166, 168–170 (159, 163, 167 are quarter roll-ups and receive no postings). Amounts on transactionaccountingline follow the GL sign convention; revenue is credit-negative and is negated for presentation.
Resolves period names to internal ids for report filters and WHERE clauses.
SELECT id, periodname, TO_CHAR(startdate,'YYYY-MM-DD') AS startdate, isquarter, isyear, closed
FROM accountingperiod
WHERE startdate >= TO_DATE('2025-01-01','YYYY-MM-DD') AND startdate < TO_DATE('2026-10-01','YYYY-MM-DD')
ORDER BY startdate, isyear DESC, isquarter DESCEstablishes which transaction types post to P&L accounts and the line and transaction counts used in the tie-out.
SELECT t.type, COUNT(DISTINCT t.id) AS txns, COUNT(*) AS lines, ROUND(SUM(-tal.amount),2) AS amt
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN account a ON tal.account = a.id
WHERE t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype IN ('Income','COGS','Expense','OthExpense','OthIncome')
GROUP BY t.type ORDER BY t.typeThe channel split in Section 1. Note that account.acctname is not exposed to SuiteQL; fullname is used.
SELECT a.acctnumber, a.fullname, a.accttype, t.type, COUNT(DISTINCT t.id) AS txns, ROUND(SUM(-tal.amount),2) AS amt
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN account a ON tal.account = a.id
WHERE t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype IN ('Income','COGS','OthIncome')
GROUP BY a.acctnumber, a.fullname, a.accttype, t.type
ORDER BY a.acctnumber, t.typeFeeds Figures 2 and 4, the exact-ratio tests (5360 / 5310, 6060 / journal 4210, 8100 = 6460) and the monthly tie-out. Reduced with JavaScript; rows never left the browser.
SELECT a.acctnumber AS acct, a.accttype AS atype, t.type AS ttype, t.postingperiod AS per,
ROUND(SUM(-tal.amount),2) AS amt, COUNT(DISTINCT t.id) AS txns
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN account a ON tal.account = a.id
WHERE t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype IN ('Income','COGS','Expense','OthExpense','OthIncome')
GROUP BY a.acctnumber, a.accttype, t.type, t.postingperiodEach account's twelve monthly values are indexed to January = 100 and rounded to one decimal; accounts with an identical index vector are grouped. Result: one cluster of 39 accounts (including 8100), a second of 3 (6240, 6640, 6759) differing only in September rounding (80.4 vs 80.5), and 6630 differing in November rounding (104.7 vs 104.6) — 42 operating accounts on one factor; 6060, 6210, 6230 and 6610 independent.
SELECT a.acctnumber AS acct, a.accttype AS atype, t.postingperiod AS per, ROUND(SUM(-tal.amount),2) AS amt
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN account a ON tal.account = a.id
WHERE t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype IN ('Expense','OthExpense')
GROUP BY a.acctnumber, a.accttype, t.postingperiodFeeds Section 2: customer cadence (active months out of twelve), order counts and averages, freight values, location split and subsidiary split. Customer names via the entity table; entity type via BUILTIN.DF(e.type).
SELECT t.id AS tid, t.type AS ttype, t.entity AS ent, t.postingperiod AS per,
tl.subsidiary AS sub, tl.location AS loc, a.acctnumber AS acct, ROUND(SUM(-tal.amount),2) AS amt
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN transactionline tl ON tl.transaction = t.id AND tl.id = tal.transactionline
JOIN account a ON tal.account = a.id
WHERE t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype = 'Income' AND t.type IN ('CustInvc','CashSale')
GROUP BY t.id, t.type, t.entity, t.postingperiod, tl.subsidiary, tl.location, a.acctnumber;
SELECT e.id AS ent, e.entityid AS name, BUILTIN.DF(e.type) AS etype
FROM entity e
WHERE e.id IN (SELECT DISTINCT t.entity FROM transaction t
WHERE t.type IN ('CustInvc','CashSale') AND t.postingperiod BETWEEN 156 AND 170)Identifies JE105–JE116 (Subsidiary 1) and JE129–JE140 (Subsidiary 2), dated the first of each month, 62–63 lines each, plus two two-line "Negative Cash Flow" journals with no income effect.
SELECT t.id, t.tranid, TO_CHAR(t.trandate,'YYYY-MM-DD') AS trandate, t.postingperiod AS per, t.memo,
MIN(tl.subsidiary) AS sub, COUNT(*) AS lines,
ROUND(SUM(CASE WHEN a.accttype='Income' THEN -tal.amount ELSE 0 END),2) AS income
FROM transaction t
JOIN transactionaccountingline tal ON tal.transaction = t.id
JOIN transactionline tl ON tl.transaction = t.id AND tl.id = tal.transactionline
JOIN account a ON tal.account = a.id
WHERE t.type = 'Journal' AND t.posting = 'T' AND t.postingperiod BETWEEN 156 AND 170
GROUP BY t.id, t.tranid, t.trandate, t.postingperiod, t.memo
ORDER BY t.postingperiod, t.tranidEach of the six accounts fed by vendor bills has exactly one vendor and 24 bills.
SELECT a.acctnumber AS acct, e.entityid AS vendor, COUNT(DISTINCT t.id) AS bills,
ROUND(SUM(tal.amount),2) AS amt, ROUND(MIN(tal.amount),2) AS min_line, ROUND(MAX(tal.amount),2) AS max_line
FROM transactionaccountingline tal
JOIN transaction t ON tal.transaction = t.id
JOIN account a ON tal.account = a.id
LEFT JOIN entity e ON e.id = t.entity
WHERE t.type = 'VendBill' AND t.posting = 'T' AND tal.posting = 'T'
AND t.postingperiod BETWEEN 156 AND 170
AND a.accttype IN ('Expense','OthExpense')
GROUP BY a.acctnumber, e.entityid
ORDER BY a.acctnumber, SUM(tal.amount) DESCConfirms that returns (4320), discounts (4520), freight-out (6080), bad debt (6690), stock adjustment (5370) and purchase price variance (5205) exist in the chart of accounts and are active; none carried FY2025 postings.
SELECT a.acctnumber, a.fullname, a.accttype, a.isinactive
FROM account a
WHERE a.acctnumber IN ('4320','4330','4400','5370','5205','6690','8300','6340','4310','5360')
OR LOWER(a.fullname) LIKE '%discount%' OR LOWER(a.fullname) LIKE '%shrink%'
OR LOWER(a.fullname) LIKE '%obsolesc%' OR LOWER(a.fullname) LIKE '%freight%'
OR LOWER(a.fullname) LIKE '%bad debt%'
ORDER BY a.acctnumberSurfaces the four TEST invoices (memo, status Open, 2 item lines, 0 shipments, no COGS) alongside five genuine large invoices from Jones Manufacturing and Pineapple Republic (status Paid). Shipments via nexttransactionlinelink, which is populated in this account where nexttransactionlink is not.
SELECT t.tranid, TO_CHAR(t.trandate,'YYYY-MM-DD') AS trandate, e.entityid AS customer, t.foreigntotal, t.status, t.memo,
(SELECT COUNT(*) FROM transactionline tl WHERE tl.transaction = t.id AND tl.mainline='F' AND tl.taxline='F' AND tl.item IS NOT NULL) AS item_lines,
(SELECT COUNT(*) FROM nexttransactionlinelink nl JOIN transaction s ON s.id = nl.nextdoc
WHERE nl.previousdoc = t.id AND s.type='ItemShip') AS shipments,
(SELECT MIN(tl.location) FROM transactionline tl WHERE tl.transaction = t.id) AS loc,
(SELECT ROUND(SUM(-tal.amount),2) FROM transactionaccountingline tal JOIN account a ON a.id = tal.account
WHERE tal.transaction = t.id AND a.accttype='COGS') AS cogs
FROM transaction t JOIN entity e ON e.id = t.entity
WHERE t.type='CustInvc' AND t.postingperiod BETWEEN 156 AND 170 AND t.foreigntotal >= 20000
ORDER BY t.foreigntotal DESCDecomposes 1110 Trade Receivables at Dec 2025 and Aug 2026 into journal-posted and invoice-driven components.
SELECT t.type,
CASE WHEN t.postingperiod BETWEEN 156 AND 170 THEN 'FY2025'
WHEN t.postingperiod < 156 THEN 'pre-2025' ELSE 'FY2026' END AS era,
COUNT(DISTINCT t.id) AS txns, ROUND(SUM(tal.amount),2) AS ar_movement
FROM transactionaccountingline tal
JOIN transaction t ON t.id = tal.transaction
JOIN account a ON a.id = tal.account
WHERE a.acctnumber = '1110' AND t.posting='T' AND tal.posting='T' AND t.postingperiod <= 182
GROUP BY t.type, CASE WHEN t.postingperiod BETWEEN 156 AND 170 THEN 'FY2025'
WHEN t.postingperiod < 156 THEN 'pre-2025' ELSE 'FY2026' END
ORDER BY 2, 1The two item receipts posting to 5340; the 2026 summary journals; and the subsidiary of the TEST invoices.
-- IR657 and IR660 (vendor Bedline), $2,400 each to 5340
SELECT t.tranid, TO_CHAR(t.trandate,'YYYY-MM-DD') AS trandate, e.entityid AS entity, ROUND(SUM(-tal.amount),2) AS cogs
FROM transactionaccountingline tal JOIN transaction t ON t.id = tal.transaction
JOIN account a ON a.id = tal.account LEFT JOIN entity e ON e.id = t.entity
WHERE t.type='ItemRcpt' AND a.acctnumber='5340' AND t.postingperiod BETWEEN 156 AND 170
GROUP BY t.tranid, t.trandate, e.entityid;
-- Sixteen 2026 summary journals: $6,940,541.72 income
SELECT COUNT(DISTINCT t.id) AS journals,
ROUND(SUM(CASE WHEN a.accttype='Income' THEN -tal.amount ELSE 0 END),2) AS income
FROM transactionaccountingline tal JOIN transaction t ON t.id = tal.transaction JOIN account a ON a.id = tal.account
WHERE t.type='Journal' AND t.posting='T' AND tal.posting='T'
AND t.postingperiod BETWEEN 173 AND 182 AND t.memo LIKE 'Beg Balance%';
-- TEST invoices: all Subsidiary 1
SELECT t.tranid, MIN(tl.subsidiary) AS sub, s.name AS subname
FROM transaction t JOIN transactionline tl ON tl.transaction = t.id JOIN subsidiary s ON s.id = tl.subsidiary
WHERE t.tranid IN ('INV788','INV789','INV790','INV791')
GROUP BY t.tranid, s.name ORDER BY t.tranidChannel = transaction type of the posting transaction (Journal, CustInvc, CashSale) and account (4310 for services). Customer cadence = number of distinct FY2025 monthly periods in which a customer's invoices posted 4210 revenue: always-on 10–12, episodic 2–9, bought once 1. Expense pools group accounts as listed under Figure 5. Allocation-factor membership = identical January-indexed monthly vector to one decimal place (two members differ by 0.1 in one month through rounding and are included).
Before publication, 205 dollar figures (142 distinct) in the prior draft were extracted and matched against the source dictionary: 138 matched exactly; the four exceptions were regular-expression artifacts (trailing punctuation and a truncated approximation, since removed). 43 further figures introduced in Section 4, the quarterly table and the location split matched 43 of 43. Twenty-five arithmetic identities passed. The same procedure runs in this document when it is opened:
Running…