Supply Lens

Unleashed and Xero COGS and stock on hand

A cheat sheet for how Unleashed's Xero connection turns stock movements into journals, which COGS and Stock on Hand accounts they hit, how values are calculated, and why they differ from your invoices.

When you use Unleashed with Xero, stock movements don't just change your inventory: they also create accounting journals that affect Cost of Goods Sold (COGS) and Stock on Hand (SOH). This page explains when journals are created, which accounts are used, how values are calculated, and why the numbers in Xero differ from your sales invoices. Use it when you're troubleshooting unexpected postings, setting up account mappings, or making sense of your margins.

Good to know

These journals are created by Unleashed's own connection to Xero. Supply Lens creates the sales orders, and sometimes the shipments and stock adjustments, that trigger them.

The core accounting principle

  • Stock bought from suppliers is a current asset (Stock on Hand) until it's sold.
  • Once sold, the cost of that stock moves to Cost of Goods Sold, an expense on the profit and loss (P&L) statement.

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

Value used: Average Landed Cost (ALC) × quantity shipped.

Transactions that create stock journals

Unleashed transactionCOGS impactSOH impact
Sales ShipmentDebit (increase)Credit (decrease)
Stock Adjustment (out)Debit (increase)Credit (decrease)
Stock Adjustment (in)Credit (decrease)Debit (increase)
Stock Count (variance)Debit or creditCredit or debit
Stock Revaluation—Debit or credit
Assembly (with NDP or costs)Debit or creditCredit or debit

Which COGS account is used

Unleashed chooses the COGS account in this order:

  1. Product, if a COGS account is specified on the product.
  2. Customer, if a COGS account is specified on the customer.
  3. Default, from the Xero integration configuration in Unleashed.

Product group level is not currently supported. It's a common feature request.

How the journal looks in Xero

With COGS accounts assigned on products

A shipment of three products, each with a different COGS account:

DescriptionAccountAmount
Stock Movement322 - COGS Electronics£20.00
Stock Movement323 - COGS Freight£20.00
Stock Movement321 - COGS Consumable£20.00
Stock on Hand602 - Stock on Hand-£60.00

The total always balances to £0.00.

Without product-level assignment

All products fall back to the default COGS account:

DescriptionAccountAmount
Stock Movement300 - COGS (Default)£60.00
Stock on Hand602 - Stock on Hand-£60.00

Average Landed Cost

ALC = Total Stock Value / Total Stock Quantity

ALC is recalculated whenever:

  • stock is received (on a purchase order);
  • additional costs are added (cost lines);
  • assemblies are completed;
  • stock adjustments occur.

Shipment value = the sum of (product ALC × shipped quantity).

Splitting COGS

Split byUse caseSupported?
ProductGranular margin analysisYes: assign a COGS account on the product
Product groupCategory-level P&L reportingNo (feature request)
CustomerChannel or customer profitabilityYes: assign a COGS account on the customer
WarehouseLocation-based reportingNo

Xero account types you need

Unleashed accountXero account type
Stock on HandCurrent Asset
Cost of Goods SoldDirect Costs / Expense
SalesRevenue

Quick reference: debits and credits

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

Troubleshooting

Stock on Hand doesn't match between Unleashed and Xero

  • Check for failed exports in the Xero queue.
  • Make sure all transactions are approved in Xero.
  • Look for manual amendments made directly in Xero.

COGS is going to the wrong account

  • Check the hierarchy: product, then customer, then default.
  • Check the product record has the correct account assigned.

The journal value differs from the invoice

  • The invoice is the selling price (revenue).
  • The journal is the Average Landed Cost (cost).
  • They should be different: the difference is your margin.