One sales invoice posts its stock issue, its entries and its receipt voucher in a single transaction

Posting one sales invoice issues the goods first-expired-first-out, posts the cost-of-sales entry (under perpetual inventory) and the revenue and tax entry, and opens the customer's receivable with its due dates – in one transaction. We follow the steps in order, for an invoice and then for a sale at the till.

When an accountant posts a sales invoice, or a till uploads a paid sale, the system records a chain: a stock movement, a journal entry, tax and a receivable on the customer. This note follows it in order.

Before posting: three checks

  1. Approval. If an approval template matches the document type, the draft waits for approval. A manual price needs its own permission – otherwise it goes to approval or is refused.
  2. Copied quantities. An invoice copied from an order or a delivery is checked again against what remains of the source line.
  3. Credit limit. The customer's exposure is the posted balance, open orders, goods delivered but not invoiced, and this invoice. Above the limit the post is refused, unless the user holds the override permission and confirms. The override is audited.

Posting: six steps, one transaction

  1. Period. The invoice date must fall in an open fiscal period.
  2. Exchange rate. A foreign-currency invoice takes the rate entered on it, or else the rate of its exact date. If none exists for that day, posting stops. The system never assumes 1 or the latest rate.
  3. Number. It comes from the company's series inside the same transaction, so a rolled-back post leaves no gap.
  4. Stock. An invoice with no delivery before it issues the goods itself. Inventory converts the quantity to the base unit, picks batches first-expired-first-out and applies the negative-stock policy of the item and warehouse (block, warn or allow). Under perpetual inventory it then posts its own entry: debit cost of sales, credit inventory.
  5. Revenue entry. Debit the customer's control account with the total, one line per instalment of the payment term with its due date. Credit the sales account of the item family at gross. Debit sales discount with every discount. Credit output VAT per tax code.
  6. Receipt voucher. If the invoice carries cash, card or transfer payments, a posted receipt voucher is created in Cash and Banks and matched to the invoice's open items.

All of it is one database transaction: if a step fails, nothing is saved. A posted invoice cannot be edited. It is corrected by a reversal that mirrors the original entry.

A worked example

One line worth 100.00, a 10% discount, a 16% tax code.

AccountDebitCredit
Customer receivable104.40
Sales discount10.00
Sales100.00
Output VAT14.40

Tax is calculated and rounded per line – there is no tax at header level. Every taxed line of the entry is tagged with its tax code, and the VAT return reads only those lines.

At the till

The terminal uploads the sale and the server recalculates the tax of every line with its own rate. If the device's figures differ, the server's stand and the sale is flagged. Each paid sale posts its own entry: cash to drawer clearing, card to the card clearing account, a sale on account to the customer's receivable. Revenue, discount and tax post as on an invoice. Cost of sales goes through Inventory.

  • A sale made offline against stock that was not there is accepted and flagged, not rejected.
  • If the period of the business date is closed, the sale posts on the first day of the next open period, flagged.
  • A sale that cannot post – a missing account, an expired batch – is held in the sync worklist for the controller, never lost.

What the accountant sees afterwards

The receivable lines appear in the customer's statement and in the aging report, and stay open until a receipt is matched to them. The invoice links to its journal entry, its stock entry and its receipt voucher.

All articles

What is new

More articles