StockCount
Updated
A stock count records the quantity found in a cell and posts the difference from the quantity on hand. It does not post a signed quantity. A signed quantity is StockAdjustment.
| Kind | Document |
| Module | Inventory |
| Menu | Inventory → Documents → Stock counts |
Fields#
| Field | Caption | Points at |
|---|---|---|
ID |
Number | number sequence |
Cell |
Cell | StoreCell |
CountDate |
Count date | date and time |
Cell and CountDate are required. ID comes from StockCountSeq, which starts at 1000 and steps by 1.
CountDate is the business date. Saving a Posted document stamps the document date from the stored CountDate, and Stock movements use that date. The comparison itself reads the quantity on hand at posting.
Table parts#
Lines#
StockCountLines, caption Lines.
| Field | Caption | Points at |
|---|---|---|
Item |
Item | Item |
CountedQty |
Counted qty | decimal |
Unit |
Unit | UnitOfMeasure |
BaseQuantity |
Qty in base unit | decimal |
Cell |
Cell | StoreCell |
QtyDelta |
Qty delta | decimal |
Item and CountedQty are required. Unit and the line Cell are optional. BaseQuantity and QtyDelta are hidden. BaseQuantity is filled on save from Counted qty and Unit. An empty Unit leaves it at zero, and the entered Counted qty is compared instead.
An empty line Cell uses the header Cell. A filled line Cell is compared with that cell.
Commands and states#
| State | Command | What happens |
|---|---|---|
| Draft | Post stock count | Posted. QtyDelta is the counted base quantity minus on-hand Qty. Stock changes by that difference. A zero difference writes no movement. |
Post stock count (PostStockCount) is bound to Draft. Posted stays editable. Saving a changed Posted document reverses this document's movements and calculates the difference again. The command reloads the saved document, so an unsaved edit is ignored. It refuses an empty Lines list, a line with no Item, and a counted base quantity below zero. The stored captions match the names: Draft, Posted.
The refusal text and the success text are fixed Russian sentences in the command.
Registers#
On Posted, StockCountTx writes Stock: dimension Item, dimension Cell, resource Qty equal to QtyDelta, and only when QtyDelta is not zero. A positive Qty adds stock. A negative Qty writes it off. The document writes no customer or supplier register, and it does not subtract ReservedStock.
After Posted, a surplus is valued at the current average and opens a cost layer dated CountDate. A shortage is valued from the stock decrease. When ledger settings exist and the header Cell has a legal entity, the journal debits Inventory account and credits Inventory surplus account for the surplus, and debits Inventory write-off account and credits Inventory account for the shortage. The two amounts stay separate. With no ledger settings, or with no legal entity on the header Cell, stock still changes and no journal line is written.