stock_count_lines table
The stock_count_lines table in the Inventory Management Database Schema schema has 9 columns, keyed by id, with 3 foreign keys to stock_counts, products and locations.
expected_quantity is frozen when the count sheet is generated. Approving a non-zero variance writes an adjustment movement.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| stock_count_id | uuid | not null, references stock_counts.id | |
| product_id | uuid | not null, references products.id | |
| location_id | uuid | not null, references locations.id | |
| expected_quantity | integer | not null | |
| counted_quantity | integer | ||
| variance | integer | ||
| counted_by | varchar(120) | ||
| counted_at | timestamptz |
Indexes (2)
(stock_count_id)(product_id, location_id)
Relationships
stock_count_lines.stock_count_idreferencesstock_counts.idstock_count_lines.product_idreferencesproducts.idstock_count_lines.location_idreferenceslocations.id