An API is required for querying receiving history. This is a read-only API that only supports GET by CQL query. The API queries a view that combines piece and parts of the po_line tables.
(string) id – UUID of this piece
(string) caption – Volume/enumeration information
(string) comment – Free form commentary
(string) item_id – UUID of the item record; Used to obtain barcode, and locationId (via holdingId)
(string) po_line_id – UUID of po_line
(string) po_line_number – Human readable identifier for this po_line
(date-time) received_date – Date received
(string) receiving_note – A note at the po_line level pertaining to receiving/check-in
(string) status – [Received | Expected]
(boolean) supplement – Whether or not this is supplementary material
(string) title – Title of the instance this po_line is associated with
View creation (via script to be executed as part of _/tenant endpoint (e.g. similar to the scripts used to insert reference data, etc.
Gives: | id (piece) | jsonb | where jsonb looks like the schema defined above.
- The schema, view and API exist as described above.
- 80% unit test coverage - may need to call pieces/po_line apis as part of test setup