Supply Lens

COGS and stock on hand in Xero

Lesson 20 of 24 8 min read

How Unleashed's own Xero connection turns stock movements into journals, which accounts they hit, and how the values are calculated.

Your accountant opens Xero and asks why cost of goods sold jumped, or why the stock figure does not match Unleashed. To answer, you need to know how Unleashed's own connection to Xero turns every stock movement into a journal. This lesson explains the logic in plain terms. It is Unleashed's behaviour, not Supply Lens's, but it is the most common question on an Unleashed project.

The core principle

  • Stock bought from suppliers is a current asset, Stock on Hand (SOH), until it is sold.
  • When it is sold, its cost moves to Cost of Goods Sold (COGS), an expense on the profit and loss statement.

So selling stock moves value from the balance sheet to the P&L.

What happens when a sales shipment completes

When a sales shipment is completed in Unleashed, Unleashed creates a bill in Xero labelled Stock Journal:

AccountEntryEffect
Stock on HandCredit (negative)Reduces the asset on the balance sheet
Cost of Goods SoldDebit (positive)Recognises the expense on the P&L

The value is the Average Landed Cost (ALC) × quantity shipped.

Rendering diagram...

Average landed cost

ALC = total stock value ÷ total stock quantity.

Unleashed recalculates it whenever stock is received on a purchase order, extra costs are added as cost lines, assemblies are completed, or stock adjustments happen. A shipment's value is the sum of each product's ALC × shipped quantity.

Every transaction that creates a stock journal

Unleashed transactionCOGSStock on Hand
Sales shipmentDebit (increase)Credit (decrease)
Stock adjustment outDebit (increase)Credit (decrease)
Stock adjustment inCredit (decrease)Debit (increase)
Stock count varianceDebit or creditCredit or debit
Stock revaluation—Debit or credit
Assembly (with costs)Debit or creditCredit or debit

A quick way to remember it:

ActionCOGSStock on Hand
Sell or ship stockDebit ↑Credit ↓
Receive stock—Debit ↑
Write off stockDebit ↑Credit ↓
Find extra stockCredit ↓Debit ↑

Why the journal never matches the invoice

The sales invoice carries the selling price (revenue). The stock journal carries the average landed cost (cost). They should be different: the difference is your margin.

Hilltop's first month in Xero

Hilltop ships 20 bags of espresso blend with an ALC of £3.00 and sells them at £9.00 each. In Xero, the sales invoice shows £180 of revenue. The Stock Journal debits COGS £60 and credits Stock on Hand £60. Hilltop's accountant sees £120 of margin, exactly as expected. When Priya books a stock adjustment for two damaged bags, a second journal debits COGS £6 and credits Stock on Hand £6.

Where Supply Lens fits

Supply Lens creates the sales orders, and sometimes the shipments and stock adjustments, that trigger these journals. So the timing of journals follows the timing of your integration: if createSalesShipment is on, the shipment, and therefore the journal, happens when the order is created. Some Supply Lens settings also shape what Unleashed sends to Xero; the next lesson covers them.

Recap

  • Stock is an asset until sold; selling moves its cost to COGS.
  • A completed sales shipment creates a Stock Journal in Xero: debit COGS, credit Stock on Hand, at ALC × quantity.
  • ALC is recalculated on receipts, cost lines, assemblies and adjustments.
  • Adjustments, counts, revaluations and assemblies create journals too.
  • Journals use cost, invoices use price; the difference is margin.

Quick guides for this topic

Complete and continue

Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.