Industry guide

Retail and Wholesale Supplier Invoices: Code Mixed Baskets

A shop's supplier invoice rarely belongs in one account. Stock for resale sits next to shelf labels, bags, cleaning products and a freight charge. Code it all to purchases and your gross margin is wrong. Here's how retailers and wholesalers can code mixed invoices line by line, automatically.

By BillBjorn team Reviewed November 27, 2026 5 min read

The short answer: Set up a supplier rule with Auto-Code Lines and categories that match your profit and loss: stock for resale, packaging, consumables, freight. BillBjorn reads every line, matches it to a category using your AI Matching Hints, and creates one coded line per category with the right account and tax code. It codes to accounts; stock quantities stay in your inventory system.

Why mixed invoices distort margin

Gross margin is sales minus the cost of what you sold. When a wholesaler invoice for stock also includes carry bags, price labels and a fuel surcharge, and the whole lot goes to Purchases, your cost of goods is overstated and margin looks worse than it is. The reverse happens when stock ends up in a general expense account.

Coding line by line by hand fixes it, but a busy shop gets dozens of these invoices a week.

Categories that match your P&L

With Auto-Code, each supplier rule lists your categories with an account, a tax code and an AI Matching Hint:

CategoryAccountAI Matching Hint
Stock for resaleCost of goods soldthe product lines you sell
PackagingPackagingbags, boxes, tape, tissue, labels
Store consumablesStore suppliescleaning, receipt rolls, batteries
FreightFreight inwardsfreight, delivery, shipping, fuel surcharge
FeesBank and merchant feescard fee, admin fee

Lines are grouped into one coded line per category, so a 60-line invoice becomes four or five lines in your books. Anything that fits no category is flagged "Contains unmatched items" instead of being guessed.

Stock accounts and inventory items

BillBjorn creates bills with account-based lines: each line has an account, a tax code and, on QuickBooks Online and Xero, optional tracking. It doesn't create inventory item lines or update stock quantities.

  • If you expense stock or post it to an inventory asset account, Auto-Code handles it directly.
  • If you track quantities with inventory items or a separate inventory or POS system, receive the stock there, and use BillBjorn for the supplier bills that don't touch inventory, such as rent, freight carriers, packaging and services.

Handling volume

  • One invoice address: ask suppliers to send invoices to your BillBjorn email address, or forward from Gmail or Outlook.
  • Paper with deliveries: scan the week's delivery invoices in one stack with Scan2Invoice.
  • Several stores: a rule can add a class, location or tracking category on QuickBooks Online and Xero, or use keywords such as the store address to pick the right one.
  • Duplicates: an invoice that arrives by email and on paper is flagged as a possible duplicate.

Start with your biggest supplier

  1. Pick the supplier with the most lines per invoice.
  2. Create its rule with Auto-Code Lines and four or five categories.
  3. Test the rule on a recent invoice and compare the result with how you'd code it.
  4. Extend the hints for any line flagged as unmatched.

How rules work in detail: supplier rules. Try BillBjorn free for 30 days; line items are included from the Small plan.

Frequently asked questions

Common questions about retail and wholesale supplier invoices. More in our knowledge base.

  • How should a shop code supplier invoices with mixed items?

    Split each invoice by what the lines are: stock for resale to cost of goods sold or an inventory account, and consumables, packaging, freight and fees to their own expense accounts. BillBjorn Auto-Code does this automatically by matching each line to categories you define.

  • Does BillBjorn update inventory item quantities?

    No. BillBjorn creates bills with account-based lines, coded to your accounts and tax codes. If you track stock quantities with inventory items in your accounting software or a separate inventory system, receive the stock there.

  • Can freight be coded separately from stock?

    Yes. Add a freight category with hints such as 'freight, delivery, shipping', and delivery charges are grouped into their own line.

  • What about invoices with GST-free and taxable products?

    Each Auto-Code category carries its own tax code, so lines are coded with the right tax as they're grouped. For receipts that only show the total and tax, Split By Tax works out the taxable and tax-free amounts.

Keep reading

All guides in AI line-item extraction and coding

Start your free 30-day BillBjorn trial today