CountAppliedEvent
EventType: COUNT_APPLIEDDomain: inventory Broker subject: progress.notification.inventory
Applies a single count record from a count session: creates inventory adjustment movements and updates is_in_position quantities for the counted product at the counted position.
Trigger
Triggered by: POST /event (universal event dispatcher)
Dispatched via POST /event in backend/api/endpoints/traceability.py with event_type: COUNT_APPLIED.
Preconditions
inventory_count_recordexists with keyinfo.count_record_keyMovementListexists with keyinfo.movement_list_keyInventoryCountSessionexists with keyinfo.inventory_count_session_key
State Changes (Transaction)
Collections: inventory_count_record, Product, MovementList, movement, Serial, is_in_position
inventory_count_recordupdated: marked as processedmovementrecords inserted for adjustmentsis_in_positionquantities updated to match counted values
Side Effects (post_processing)
Inherits post_processing() from BaseInventoryEvent:
- Publishes to
progress.notification.inventory
InfoModel Fields
| Field | Type | Description |
|---|---|---|
count_record_key | str | Key of the count record to apply |
movement_list_key | str | Key of the adjustment movement list |
inventory_count_session_key | str | Key of the parent count session |
Related Events
None.