Your financial statements show a 35% gross margin one month and 27% the next. Sales volumes are stable, purchasing costs have not changed significantly, and your finance team cannot explain the difference.
Is the business becoming less profitable, or is your ERP reporting costs in the wrong place or the wrong period?
For manufacturers and distributors, the answer often requires looking beyond the general ledger. Inventory valuation, production overhead, work in progress, purchase price variances, and accounting configuration all influence the numbers that appear on your income statement.
The same questions come up when implementing a new ERP: which costs should be capitalized, which should be expensed, and how should the system recognize those costs over time?
Understanding the difference between CapEx, OpEx, and COGS is important. Making sure your ERP handles them correctly is where the real work begins.
What is the difference between CapEx, OpEx, and COGS?
The short answer: CapEx builds an asset, OpEx runs the business, and COGS is the cost of what you actually sold.
| Category | What it covers | Where it lands | When it hits profit |
|---|---|---|---|
| CapEx | Long-lived assets: equipment, facilities, vehicles, qualifying software | Balance sheet, as a fixed or intangible asset | Gradually, through depreciation or amortization |
| OpEx | Costs of running the business: rent, office salaries, marketing, subscriptions | Income statement, below gross profit | In the period incurred |
| COGS | Direct cost of products sold: materials, direct labor, production overhead | Inventory first, then the income statement when sold | When the sale happens, not when you buy |
The timing column is the one that matters most. COGS does not hit your income statement when you buy materials. It hits when the finished product ships. Everything in between sits in inventory, and that is where most classification problems hide.
What actually belongs in COGS for a manufacturer?
For a manufacturer, COGS includes production overhead, not just materials and direct labor. Many general business articles say overhead stays out of COGS. That is true for a retailer, but under GAAP a manufacturer must include a share of factory overhead in the cost of inventory.
A complete manufacturing cost typically includes:
- Direct materials, including freight and landed costs to bring them in
- Direct labor on the production floor
- Variable overhead, such as machine power and consumables
- Fixed production overhead, such as plant depreciation, maintenance, and supervision, allocated on a normal capacity basis
This is where CapEx and COGS meet. When you buy a new filling line, it is CapEx. Once it is running, its depreciation becomes part of production overhead, flows into the cost of each unit, and eventually lands in COGS. If your ERP is not configured to absorb that overhead, your product costs are understated and your margins look better than they are.
For food and beverage companies, the same logic applies to packaging, co-products, and yield loss. A bottle, a cap, and a label are just as much a part of COGS as the liquid inside.
Not every production cost belongs in inventory. Abnormal waste, unusual spoilage, and the cost of idle capacity are generally expensed in the period they occur, rather than absorbed into the cost of products.
How a $100,000 overhead error can make your gross margin look better than it is
Consider an illustrative beverage manufacturer with $1,000,000 in monthly revenue. Its transactions process correctly, but production overhead is never absorbed into product cost. Instead, $100,000 of plant costs is coded to general and administrative expense.
| Line item | Reported | Corrected |
|---|---|---|
| Revenue | $1,000,000 | $1,000,000 |
| COGS | $650,000 | $750,000 |
| Gross profit | $350,000 | $250,000 |
| Gross margin | 35.0% | 25.0% |
It is important to be precise about what is wrong here. Because the overhead was recorded somewhere, total operating profit is largely unaffected, apart from the portion that belongs in ending inventory. The real problems are classification and timing: gross margin is overstated by ten points, product-level margins are wrong, and pricing decisions are being made on costs that leave out a meaningful share of what it takes to produce each case.
The transactions look fine. The configuration is what is wrong.
How does Sage X3 calculate COGS?
In Sage X3, the cost of goods sold is the result of three separate layers of setup working together:
- Stock valuation determines the movement cost. When stock is issued, Sage X3 values the movement using the valuation method defined on the product-site record. Product categories supply the defaults, but the product-site is where the rule actually lives.
- Stock accounting and automatic journals determine the financial entries. Stock movements do not necessarily post to the general ledger at the moment they occur. The stock accounting interface generates the entries, often as a separate process, based on the automatic journal setup.
- Accounting codes determine which accounts receive the entries. The same shipment can post to very different COGS, inventory, and variance accounts depending on how accounting codes are assigned.
The valuation methods available in Sage X3 include:
- Standard cost, where stock is valued at a fixed cost for the fiscal year and differences are tracked as variances
- Revised standard cost, a standard that can be updated for a defined date range
- Weighted average cost, recalculated as each receipt blends into the running average
- FIFO, where the oldest receipt layers are consumed first
- Average lot cost, where cost is tracked by lot, which suits lot-controlled food and beverage products
- Last cost and LIFO, which are less common in practice
In production, work orders consume materials and labor into work in progress and release finished goods at a calculated cost. Differences between expected and actual cost are identified through work order costing and WIP accounting. How and when those differences reach the general ledger depends on your costing setup, production tracking, and posting configuration.
When these layers are aligned, COGS in Sage X3 is accurate and explainable. When one of them is not, such as an interface backlog, an unmapped accounting code, or an outdated standard, the error moves quietly into your margins.
What happens when the supplier invoice does not match the receipt?
This is one of the most common sources of margin distortion we see in distribution and beverage companies.
A distributor receives 1,000 cases at the purchase order price of $10.00 per case, for a stock value of $10,000. Before the supplier invoice arrives, 600 cases are sold. The invoice then comes in at $10.75 per case, which adds $750 to the true cost of the receipt.
| Status | Cases | Share of the $750 |
|---|---|---|
| Already sold | 600 | $450, related to cases already sold |
| Still in stock | 400 | $300, related to cases still in inventory |
What happens next depends on configuration. For products valued at average cost or FIFO, Sage X3 can generate cost adjustments that revalue issues already made, so the $450 can be reflected in cost of sales. For products at standard cost, the difference is generally recorded as a purchase price variance, and where that variance lands depends on your accounting setup and policy.
If issue-cost adjustment is not enabled, adjustments remain unprocessed, or the accounting period closes before the adjustments are posted, the resulting financial impact may be recognized differently or in a subsequent accounting period. Depending on the valuation method and accounting configuration, differences may appear in inventory, cost of sales, or variance accounts. This can distort gross margin reporting between periods, making timely cost adjustment processing and reconciliation essential.
Is an ERP implementation CapEx or OpEx?
The answer is usually both. Under US GAAP, part of an ERP implementation can be capitalized and part must be expensed. The rules that decide which part are also changing.
The traditional framework
For many years, ASC 350-40 (internal-use software) has divided a project into three stages:
| Project stage | Typical activities | Usual treatment |
|---|---|---|
| Preliminary | Software selection, vendor demos, needs assessment | Expensed |
| Application development | Configuration, custom development, interfaces, testing, installation | Capitalized |
| Post-implementation | Training, ongoing support, routine maintenance | Expensed |
Data conversion is generally expensed, unless it involves building software needed to make the new system work. For cloud or subscription deployments, ASU 2018-15 applies the same logic to implementation costs, which are then amortized over the term of the hosting arrangement in the same expense line as the subscription fees.
What changes under ASU 2025-06
In September 2025, FASB issued ASU 2025-06, which removes the project-stage model from ASC 350-40. Under the new guidance, capitalization begins when management has authorized and committed to funding the project, and it is probable that the software will be completed and used as intended. Where significant development uncertainty exists, capitalization is deferred.
The update is effective for annual periods beginning after December 15, 2027, with early adoption permitted. Until a company adopts it, the traditional stage-based approach still applies. FASB has indicated that it does not expect capitalized amounts to change significantly for most types of software.
Why this matters for your project
Under either framework, the outcome depends on documentation. Management approval, funding commitment, and a clear separation of selection, configuration, development, data conversion, and training in the statement of work all make the capitalization position easier to support. It is far harder to reconstruct after go-live.
Companies reporting under IFRS follow different guidance, and configuration costs in a cloud arrangement are often expensed under IFRS. Tax treatment can also differ from book treatment. Confirm your approach with your auditor and CPA before the project starts.
How do you know your cost classification is off in Sage X3?
The signs usually show up in reports long before anyone traces them to configuration. Here are the ones we see most often:
- Gross margin swings without a business reason. Look for delayed purchase invoice adjustments, manufacturing variances landing in one period, and cost adjustments that were never processed.
- Stock valuation does not reconcile to the general ledger. The usual causes are a backlog in the stock accounting interface, differences between movement dates and accounting dates, and incorrect automatic journal mapping.
- FIFO layers look wrong. Negative inventory, backdated transactions, and receipts valued at the wrong price all distort the cost of the next issue.
- Work orders remain open for months. WIP balances stay unsettled and production tracking is incomplete, so costs never reach finished goods or COGS.
- Standard costs are outdated. Bills of materials, routings, overhead rates, and material prices have changed, but the standards have not, so variances grow large enough to hide real problems.
- Equipment purchases are expensed directly. Capital items bypass the Fixed Assets module, so assets are missing from the balance sheet and manufacturing depreciation never reaches product cost.
If two or more of these sound familiar, a structured review is worthwhile. In most cases the fix is configuration and process, not a new system.
Frequently asked questions
Is depreciation part of COGS?
Depreciation on production equipment and plant is part of manufacturing overhead, so it flows into inventory cost and then COGS. Depreciation on office equipment or sales vehicles is an operating expense.
Are Sage X3 subscription fees CapEx or OpEx?
Ongoing subscription or hosting fees are operating expenses. Certain implementation costs for a cloud deployment can be capitalized and amortized over the subscription term.
Is freight included in COGS?
Inbound freight on materials is generally part of inventory cost and therefore COGS. Outbound shipping to customers is often treated as a selling expense, although policies vary.
Which inventory valuation method is best in Sage X3?
It depends on your products and reporting needs. Standard or revised standard cost suits repetitive manufacturing, FIFO and average lot cost suit perishable and lot-controlled goods, and weighted average cost suits many distributors.
Can I change the valuation method on an existing product in Sage X3?
Yes, but it should be planned carefully. A change affects how future issues are valued and can create revaluation entries, so it is best done at a period boundary with a clear cutover plan.
Can Sage X3 track CapEx budgets?
Yes. Sage X3 supports capital budgeting and commitment tracking, and the Fixed Assets module handles depreciation across multiple plans, such as book and tax.
Does ASU 2025-06 change whether I can capitalize my ERP project?
For most projects, the amounts capitalized are not expected to change significantly. What changes is the trigger: capitalization depends on management authorization, funding commitment, and probable completion, rather than on project stages.
Do these rules apply to companies in the Caribbean?
Only if they report under US GAAP. Many Caribbean companies report under IFRS, which has its own guidance on software and inventory costs. The Sage X3 configuration issues described here apply regardless of the framework.
Sage X3 Costing and Financial Integrity Review
PRH Consulting offers a focused assessment for manufacturers and distributors that are seeing unexplained margin movements, valuation discrepancies, or production costing issues in Sage X3.
What we review:
- Inventory valuation methods by product and site
- Stock-to-GL reconciliation and the stock accounting interface
- Production overhead absorption and WIP accounting
- Standard costs, variances, and landed costs
- Automatic journals and accounting code mappings
- Fixed asset setup and manufacturing depreciation
What you receive: a prioritized findings report that identifies configuration issues, quantifies the financial exposure where possible, and lists recommended corrective actions.
We are not here to sell you a new system. In most cases, the system you already have can produce the right numbers once it is configured correctly. If you are planning an implementation instead, we can help you set up cost tracking and capitalization documentation from the start.
Schedule a Sage X3 Costing ReviewSources
- FASB Accounting Standards Update 2025-06
- Crowe: FASB Revises Internal-Use Software Cost Guidance (ASU 2025-06)
- EisnerAmper: Modernized Accounting Guidance for Internal-Use Software Costs
- Sage X3 Online Help: Valuation methods
- Sage X3 Online Help: Basic principles for the valuation of stocks
- Sage Community Hub: Understanding Sage X3 valuation methods and correcting inventory cost errors
