goods_receipt_lines table
The goods_receipt_lines table in the Inventory Management Database Schema schema has 7 columns, keyed by id, with 3 foreign keys to goods_receipts, purchase_order_lines and locations.
Only quantity_accepted writes a positive stock_movement. Rejected goods are recorded but never enter sellable stock.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| goods_receipt_id | uuid | not null, references goods_receipts.id | |
| purchase_order_line_id | uuid | not null, references purchase_order_lines.id | |
| location_id | uuid | not null, references locations.id | |
| quantity_accepted | integer | not null | |
| quantity_rejected | integer | not null | |
| rejection_reason | varchar(255) |
Indexes (2)
(goods_receipt_id)(purchase_order_line_id)
Relationships
goods_receipt_lines.goods_receipt_idreferencesgoods_receipts.idgoods_receipt_lines.purchase_order_line_idreferencespurchase_order_lines.idgoods_receipt_lines.location_idreferenceslocations.id