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)

Columns of the stock_count_lines table
ColumnTypeConstraintsDescription
iduuidprimary key
stock_count_iduuidnot null, references stock_counts.id
product_iduuidnot null, references products.id
location_iduuidnot null, references locations.id
expected_quantityintegernot null
counted_quantityinteger
varianceinteger
counted_byvarchar(120)
counted_attimestamptz

Indexes (2)

  • (stock_count_id)
  • (product_id, location_id)

Relationships