Since piece and poLine records are stored separate from one another, and are managed via their own APIs, there's the possibility that inconsistencies may arise. The receiptStatus fields could get out of sync. So solve this problem, whenever a piece record's receivingStatus changes, we should emit an event which triggers the "calculation" of the corresponding poLine's receptStatus...
This builds upon the vertx eventBus work done in
- poLine.receiptStatus is "calculated" whenever a related piece record's receivingStatus is changed. This happens asynchronously via the vertx event bus.
- Unit tests are updated
- API tests are updated