Send Stock Event on Proof of Delivery confirmation

Description

As Spock, I want my stock information to be updated when I accept shipment.

Acceptance Criteria

  • When confirming a Proof of Delivery a stock event should be send to the Stock Management service using the following mapping:

StockEventDto

ProofOfDelivery

Other

facilityId

shipment.order.receivingFacilityId

programId

shipment.order.programId

userId

ID of the user doing the Proof of Delivery confirmation

  • For each Proof of Delivery Line Item with accepted stock a new line item is added to the sent stock event using the following mapping:

StockEventLineItemDto

ProofOfDeliveryLineItem

ProofOfDelivery

Other

orderableId

orderable.id

lotId

lot.id

occuredDate

The date of Proof of Delivery confirmation

quantity

quantityAccepted

reasonId

The ID of the "Transfer In" reason from the Stock Management service

sourceId

shipment.order.supplyingFacilityId

extraData.vvmStatus

vvmStatus

  • The confirmation action should still update the Proof of Delivery and Order statuses.

  • The feature should be written in such a way it could be disabled with single flag (to make it easier to implement flag-based features).

Status

Assignee

Łukasz Lewczyński

Reporter

Jake Watson

Labels

None

Story Points

3

Time tracking

12h

Epic Link

Components

Sprint

None

Fix versions

Priority

Major