We need to support the ability to roll back or undo receiving a piece. See
UIREC-21 for additional details.
I think we should be able to reuse the POST /orders/receive endpoint for this purpose; the difference would be that piece and item status would be "Expected" and "On Order" respectively. We might not need/want all the detail either, e.g. barcode, caption, comment, etc. It would probably suffice to have just the piece/item ids and status.
- the receivingStatus of the specified pieces is changed to "Expected" and receivedDate set to null/removed
- the status of associated items is changed back to "On Order" (Dennis to verify) DB: Yes this is correct
- the POST /orders/receive endpoint is used.
- any changes to the POST /orders/receive endpoint should be backwards compatible if possible
- The requirements above are met
- test case(s) have been added to the unit tests (as always, 80%+ code coverage on new code)
- test case(s) have been added to the API tests
- the description in the RAML for this endpoint is updated to include a note describing this new behavior