See True Customer & Product Net Margin After Deducting Credits, Rebates & Freight
Top-line sales look strong on your dashboard, but hidden credits, rebates, and freight costs are quietly turning major customers into money-losers.
Buy our Net Profitability Console to see true net profit by customer, warehouse, and item after every credit and cost is deducted.
entity or item). This Dashboard is entirely scoped to the National Perishables Importer & Distributor LLC subsidiary — confirmed 100% of this item-invoice data belongs to it, so selecting a different Subsidiary in the header will correctly show no data here. For the figure that does tie to the income statement, including a real Subsidiary breakdown, see the Cost of Sales page.
Net Sales vs. CM % — bubble size = contribution margin dollars. Dashed lines mark the median sales and average CM% for the current filter.
This page uses real Total Income (all 6 real income accounts) and the full total across all 37 real COGS accounts — both queried, not assumed — and splits Cost of Sales into Variable vs. Fixed so the true, fully-loaded margin is visible instead of hidden inside partial numbers on both sides.
Still a judgment call, not derived data: which of the 37 accounts count as Variable vs. Fixed is an accounting classification I made (e.g. all freight and direct labor as Variable; storage, depreciation, and overhead absorption as Fixed) — the account names and dollar amounts are real and queried, but the Variable/Fixed tag on each one should be confirmed with your controller, not taken as authoritative from this build.
This page documents every number on the Dashboard: what it means, how it's calculated, and — since this build is headed toward a NetSuite Suitelet — exactly which NetSuite field it will come from once it's wired to real data. Anywhere this HTML sample uses mock/derived data instead of a real NetSuite field, that's called out explicitly. For the Cost of Sales page's metrics, see its own Metric Definitions.
| Control | What it does | NetSuite source |
|---|---|---|
| This Month | Current calendar month only (Jul 2026 in this mock's "today"). | Computed client-side from transaction.trandate; no separate NetSuite field. |
| Last Month | The calendar month immediately before This Month. | Same as above. |
| This Quarter | The calendar quarter containing the current month (Q3 = Jul–Sep). | Same as above. |
| TTM | Trailing 12 months ending on the most recent closed month. | Computed client-side from transaction.trandate; no separate NetSuite field. |
| YTD | January 1 of the current year through the current month. | Same as above. |
| Clear | Resets Year/Month/Customer/Category/Location filters to "All". | — |
| Year / Month | Restricts rows to a specific calendar year and/or month. | transaction.trandate |
| Customer | Restricts rows to a single customer. | transactionLine.entity → customer.entityid |
| Category | Restricts rows to one top-level item category (Beverage & Pantry/Pantry Crisps & Snacks/Botanical Beverage/Other). | transactionLine.class → classification, rolled up to its top-level parent (see Categories section below) |
| Subsidiary | Multi-select — pick one or more of the 5 real subsidiaries in this account (National Perishables Importer & Distributor LLC, Domestic Grower Subsidiary #1 LLC, Cross-Border Distribution Subsidiary #2 ULC, and two Eliminations entries); no selection means all consolidated together, matching what NetSuite's own Subsidiary Context calls "Parent Company (Consolidated)". Confirmed directly against a real Custom Income Statement with Subsidiary Context set to "National Perishables Importer & Distributor LLC": this account's Total Income for that scope matches to the dollar ($6,248,232.03 for June 2026). The Dashboard is entirely scoped to National Perishables Importer & Distributor LLC already (100% of item-invoice data belongs to it), so selecting any other subsidiary here will correctly zero out the Dashboard's cards. The Location list cascades to match: selecting Domestic Grower Subsidiary #1 LLC narrows Location down to just "DOM-GROW-SUB1" (the only real location tagged under that subsidiary); clearing Subsidiary restores the full list. On the Cost of Sales page, it narrows the real per-subsidiary, per-location data directly — see that page's Metric Definitions for the full story on why this filter exists. | transactionLine.subsidiary (lives on the line, not the transaction header — same schema pattern as location) |
| Location | Multi-select — pick one or more real facilities at once (e.g. WH1-ColdStorage + WH3-PackLine together); selections combine additively. Real, queried data — confirmed one dominant facility handles ~84% of Net Sales, with ~10% carrying no location at all (a real data-quality gap). On the Dashboard, applied as real per-month location shares (queried per month, not a flat 19-month average — that average previously overstated WH3-PackLine's June figure by more than 4x, since WH3-PackLine had a much bigger month in Nov 2025 pulling its average up). On the Cost of Sales page, it narrows a genuinely separate, exact real dataset queried per period and location (including a few GL-only cost centers that never appear on the sales side) — see that page's Metric Definitions for the exact join used to get it. | transactionLine.location → location |
These filters are shared with the Cost of Sales page — changing them here changes both.
Two kinds of comparison, not to be confused: the "Compare vs" toggle in the filter bar switches every "CM %" column/card between two bases. Last Year means the same calendar period one year earlier (e.g. This Month vs. the same month last year) — well-defined for every mode except Trailing 12 Months, where it intentionally shows "–" (a rolling 12-month window doesn't have a distinct "last year" separate from its Prior Period). Prior Period means the immediately preceding span of the same length (This Month vs. Last Month; This Quarter vs. the quarter before it; Trailing 12 Months vs. the 12 months before that; YTD vs. the same number of months immediately before Jan 1) — well-defined for every mode except a custom Year/Month selection, which can be open-ended and has no single well-defined length to shift back by.
transactionLine.netamount (negated) on CustInvc/CashSale item lines, netted against the same field on CustCred (Credit Memo) lines — real, queried data (credit memos reduced Net Sales by about $1.9M over 19 months, roughly 2.3% of gross invoiced sales).transactionLine.costestimate (negated) on CustInvc/CashSale lines. Confirmed against this account: over a multi-month window this tracks closely (within ~3%) to the ItemShip-driven postings to the main 50000 Cost of Goods Sold account — but for any single month the gap can be much larger (we saw ~9% for one month), because costestimate is dated by invoice date while ItemShip postings are dated by fulfillment date. This figure also does not include freight, direct labor, storage, or overhead absorption — those post separately (see the Cost of Sales page), and mostly aren't tied to a customer or item at all in this account's data (most of those journal entries carry no entity or item). The return-cost adjustment uses actuals, not an estimate: rather than netting in the credit memo's own costestimate (which we found ran nearly double the real number), this figure nets in the actual GL-posted return credit — transactionAccountingLine.amount where accttype='COGS' for CustCred/ItemRcpt transactions, grouped by posting period, posting='T' only (~$332K over 19 months). We checked why the estimate ran so much higher: only ~19% of credit memos trace back to a formal Return Authorization — most are billing-level credits with no physical return, so there was often no cost to reverse in the first place. Since this real credit isn't reliably traceable to a specific customer (some Item Receipt lines carry entity+item, many don't), it's applied proportionally to Net Sales within each month rather than to a specific customer row.transaction.trandate; there's no NetSuite field for "prior period," it's just a shifted date range on the same query.transaction.trandate truncated to month. COGS uses a translucent version of the purple sampled from the "National Perishables Importer & Distributor" logo's banner (same soft-fill treatment as the below-average bubbles on the Customer Profitability Quadrant).transactionLine.entity (customer) instead of by month. Click any column header to sort by it.customer.companyname) — not fictional accounts. "Other Accounts" is a real residual: company-wide monthly totals minus these 14, representing roughly 234 smaller customers bucketed together rather than modeled individually.transactionLine.class → classification table. Classification in this account is a 3-level tree (e.g. "Dry Pantry - Baking & Culinary Mixes" → "Beverages - Craft Mixers & Tonics" → "Beverages - Botanical & Teas"); since SuiteQL has no recursive CTE, the rollup to the top-level name was done once in Python against the real classification table for this build, and would need to happen in SuiteScript in the Suitelet (load the small classification table once, walk each row's parent pointer to the root, cache the result). Approximation still in place: the category split is a constant 19-month-aggregate percentage applied to every customer and every month, not queried per customer-month (that join was too heavy to run live for this pass) — so category totals are real in aggregate but not exact for any single customer or month.PRICE_PER_LB constant in the code) — it is not real. In the Suitelet, this should be replaced with a direct sum of transactionLine.quantity (in the item's stock unit) so it's exact rather than estimated.customer.category → customerCategory table. This was confirmed directly against the account's actual category list, not assumed. The 14 named customers use their own real channel; "Other Accounts" is split across channels using the real aggregate channel mix for the remaining ~234 customers (FoodService ~34%, Wholesale ~46% of that residual), not queried per customer.This page documents the Cost of Sales tab, which uses the full total across all 37 real COGS-type accounts in this account's chart of accounts (numbers 50000–58900), not the Dashboard's narrower item-as-invoiced figure. It's the one built to reconcile to your actual income statement — see the methodology note below for exactly what that required. Net Sales still respects all Dashboard filters; Total Cost of Sales only respects the date-range filters (TTM/YTD/This Month/etc.) and Location isn't yet broken out either — see the notes below on why. See the Dashboard's Metric Definitions for filter mechanics.
Three things had to be fixed to make this reconcilable, all confirmed against real data rather than assumed:
accountingperiod (the posting period), not trandate. Checked directly: 530 of 25,286 real COGS-type lines in 2026 (2.1%) have a posting period that falls in a different calendar month than the transaction date. Grouping by trandate instead would silently misstate monthly totals versus the real P&L for exactly those lines — this page groups by posting period to avoid that.Checked directly against this account: the Journal entries behind Storage, Labor Absorption, Overhead Absorption, Purchase Price Variance, and a large recurring share of Sales revenue itself all mostly carry entity: null, item: null — they're period-level entries, not tied to any specific sale. Only the ItemShip-driven portion of COGS and the CustInvc-driven portion of Income naturally tie to a customer and item. So a customer- or category-level "full Total Income" or "full Cost of Sales" isn't something this data can produce accurately without a cost/revenue-allocation methodology your controller would need to define, and this page shows the honest, company-wide (or subsidiary/location-scoped) number for both when either filter is active.
Subsidiary and Location are both fixed, with exact data, for both Total Income and Total Cost of Sales. The same Journal entries that lose entity/item still carry a real, populated subsidiary and location — confirmed directly. All totals are real per-period, per-subsidiary, per-location data: transactionAccountingLine.amount for Income-type and COGS-type accounts, posting period, posting='T', joined to transactionLine.subsidiary and transactionLine.location. Join note: both fields live on transactionLine, not the transaction header, and the correct join to it needs both key pairs together — transactionLine.id = TransactionAccountingLine.transactionline AND transactionLine.transaction = TransactionAccountingLine.transaction. Joining on just the first pair caused a massive row explosion (a query that should return a few thousand rows returned tens of millions), because transactionline.id is only unique within a single transaction, not globally. With the correct compound join, every month reconciles exactly (to the penny) against the company-wide total, and the sum of any subsidiary/location breakdown always equals the consolidated whole.
This account has 5 real subsidiaries, confirmed directly: National Perishables Importer & Distributor LLC, Domestic Grower Subsidiary #1 LLC, Cross-Border Distribution Subsidiary #2 ULC, and two Eliminations entries (one under the Parent Company, one under National Perishables Acquisition Sub #1 LLC) — matching NetSuite's own Subsidiary Context hierarchy exactly. An earlier version of Total Income on this page consolidated all of them together with no subsidiary filter at all, which meant "Total Income" and "Total Cost of Sales" were silently combining three separate legal entities' financials, not just National Perishables Importer & Distributor LLC's. That version matched a real Income Statement screenshot ($8,623,754 for June 2026) -- but that screenshot turned out to have no Subsidiary Context applied either, i.e. it was also the consolidated figure, not National Perishables Importer & Distributor LLC alone.
What this means for the earlier "$2.37M missing revenue" finding: checked directly, that gap was overwhelmingly Domestic Grower Subsidiary #1 LLC's and Cross-Border Distribution Subsidiary #2 ULC's own real revenue ($1.56M and $0.76M respectively for June, posted via Journal entries directly to their own Sales accounts) -- not revenue National Perishables Importer & Distributor LLC was somehow missing. Within National Perishables Importer & Distributor LLC (subsidiary 3) alone, that Journal-to-Sales-account activity is essentially $0. Selecting Subsidiary = "National Perishables Importer & Distributor LLC" here now shows $6,248,232.03 for June 2026 Total Income -- confirmed to match a real Custom Income Statement with Subsidiary Context set to "National Perishables Importer & Distributor LLC" exactly, to the dollar -- much closer to the Dashboard's own $6,254,536 than the old consolidated figure ever was. "DOM-GROW-SUB1" and "CAN-DIST-SUB2" are not real locations of National Perishables Importer & Distributor LLC — confirmed every DOM-GROW-SUB1-tagged line belongs to subsidiary 6 and every CAN-DIST-SUB2-tagged line to subsidiary 9, a perfect 1:1 correlation — they were location-field proxies for entirely separate companies. With no Subsidiary filter applied (the default), this page still shows all of them consolidated together, matching what NetSuite calls "Parent Company (Consolidated)" — useful for a corporate-level view, but not the same thing as National Perishables Importer & Distributor LLC's own performance, which is what the rest of this build (customers, categories, channels, the Dashboard) has always been scoped to.