How does a stock document work out cost, batch and date?
Every stock document in Inventory is checked and valued by the same rules on Save. Learn them once: the screen pages only add what is different.
Before you start
- The item, in this company, has a storage structure (whether a line needs site, warehouse, location), a tracking structure (batch, serial, which batch fields are required, first-expiry-first-out, whether expired stock may be issued) and a valuation (moving average or standard cost, and at which level: company, site or warehouse). These live on the item: see Storage Structure, Tracking Structure and Item Valuation.
- The journal of the document carries its movements and decides how far back a date may go: see Transaction Journal.
Steps
- The date. The posting date must be in a period whose inventory is open, and no inventory closing may be running or stopped. The journal can also refuse a date too far back.
- Units. Each line is converted from its unit to the item's inventory unit with the item's unit conversion. A catch-weight item uses the weight typed on the line instead, and the weight must sit inside the item's minimum and maximum.
- Cost of stock going out. A line that takes stock out is valued at the item's moving average cost on the posting date, at the item's valuation level. A standard-cost item can be set to leave at standard cost.
- Cost of stock coming in. A line that brings stock in is valued at its price, converted to the company currency at the rate of the posting date. A price of zero is refused, except for a standard-cost item (it takes its standard cost; none defined is refused), a free or sample line (which must have no price), and a subcontracting line.
- Stock available. A line that takes stock out is refused if that much is not open at its site, warehouse, location, status and custodian on the posting date, unless the item allows negative stock. Stock reserved for a sales order is kept for that order.
- Batches and serials. A batch or serial item coming in needs its batch number and whatever dates and certificate the tracking structure asks for; with automatic batch numbers the document number is used. Every new batch gets a batch card. A serial item comes in one unit per line. Going out, an empty batch is filled by first-expiry-first-out or oldest-first, splitting the line across batches; a batch past its expiry, best-before or quality retest date is left out unless expired stock may be issued, and the refusal says so.
- Quality. A receipt line of an item that needs quality, with a matching quality point, comes in under quality status and raises an inspection order. Everything else comes in open.
- Save posts. The voucher is made with the document's journal. See What posts in Inventory.
Check it worked
- The Open voucher button on the document shows the voucher.
- As On Inventory, with the item as its only criterion, shows the new stock on hand: see Lists and reports.
Undoing it
Reverse on the toolbar. The reverse date cannot be before the posting date and must be in an open period; only a posted document can be reversed; stock that came in must still be there on the reverse date to go back out. A document another screen created by itself (a consumption made by a subcontracting receipt, for example) is reversed from the document that made it. A reversed document cannot be deleted.
If something looks wrong
- "Inventory is Closed of this Period" - date it in an open period, or reverse the closing.
- "Inventory Closing is Processing, cannot create entry until Inventory Closing is Done" - wait, or reprocess a stopped closing.
- "Basic Data - Item (...) ... - Stock not available : Quantity cannot be greater than available Quantity ..." - not enough open stock there on that date.
- "Basic Data - Line ID : ... - Price cannot be zero" / "... Price cannot be negetive"
- "Basic Data - Item (...) Standard Cost not defined"
- "Basic Data - Line ID : ... - Batch / Serial Number cannot be empty", "... Batch Expiry Date cannot be empty", "... Movement Quantity can accept only 1"
- "Reverse Date: ... cannot be less than Posting Date: ...", "Only Posted Vouchers can be reversed", "Cannot Reversed System Generated Vouchers"
- The full list is in Inventory questions.