OxygenDispatch maintains a complete, immutable audit trail of every position change and status transition a cylinder undergoes. Each event is written as anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Janblack07/OxygenDispatch/llms.txt
Use this file to discover all available pages before exploring further.
InventoryMovement record that captures what happened, who performed the action, when it occurred, and which warehouse areas were involved. This audit log is the backbone of inventory accountability — from the moment a tank enters the warehouse to the moment it leaves for a client.
Warehouse areas
Warehouse areas are catalog entries managed under Settings → Warehouse Areas (/catalog/warehouse-areas) and can be extended or renamed by administrators. However, three area names are hard-coded into the business logic of TankTechnicalReviewService and the dispatch eligibility check in TankUnit. These areas must exist in the database with exactly these names for the system to operate correctly.
| Area name | Role in the system |
|---|---|
Recepción | Entry point for all newly generated tanks. Every tank starts here after batch generation. |
Productos aprobados | Tanks cleared by technical review and ready for dispatch. A tank must be in this area to be dispatchable. |
Rechazos, devoluciones y retiro del mercado | Destination for tanks that fail technical review, are returned from clients, or are withdrawn from the market. |
Even though warehouse areas are stored as catalog records, the names
Aprobado (technical status) and Productos aprobados (warehouse area) are resolved by exact string match — after case normalization — inside TankUnit::isAvailableForDispatch() and TankTechnicalReviewService. Renaming these catalog entries will break dispatch eligibility checks.Movement types
EveryInventoryMovement record carries a type field backed by the App\Enums\MovementType integer enum:
| Type | Value | When recorded |
|---|---|---|
ENTRADA | 1 | A new tank unit is generated from a batch — its first appearance in inventory |
TRASLADO | 2 | A tank is manually transferred between warehouse areas via POST /tanks/{tank}/transfer |
SALIDA | 3 | A tank is dispatched to a client and leaves the warehouse |
CAMBIO_ESTADO_TECNICO | 4 | A tank’s technical status changes (approved, rejected, or decommissioned) |
Inventory movement record fields
EachInventoryMovement row captures the following fields:
| Field | Description |
|---|---|
type | MovementType enum value — one of ENTRADA, TRASLADO, SALIDA, or CAMBIO_ESTADO_TECNICO |
occurred_at | Timestamp of when the event took place |
tank_unit_id | UUID of the affected TankUnit |
from_area_id | Foreign key to the WarehouseArea the tank moved from (null for ENTRADA) |
to_area_id | Foreign key to the WarehouseArea the tank moved to (null for SALIDA and some CAMBIO_ESTADO_TECNICO events) |
batch_id | The batch the tank belongs to — always populated |
reference_document | External document number linked to the event (e.g. reception order number, dispatch document) |
performed_by_user_email | Email of the authenticated user who triggered the action |
notes | Free-text context automatically generated by each service |
Common movement flows
New batch intake
New batch intake
When a batch is generated and tank units are created, an After this movement, the tank’s
ENTRADA movement is written for each tank. The tank has just arrived — it has no previous area — so from_area_id is null.warehouse_area is Recepción and its technical_status is Pendiente.Tank approved in technical review
Tank approved in technical review
When a reviewer approves a tank through the tank-review screen, The
TankTechnicalReviewService::approve() records a CAMBIO_ESTADO_TECNICO movement. The tank moves from its current area (typically Recepción) to Productos aprobados.TankTechnicalReview record is also written at the same time, inside the same database transaction, so both records are always consistent.Tank dispatched to client
Tank dispatched to client
When a dispatch order is confirmed, a Simultaneously, the
SALIDA movement is written for each dispatched tank. The tank leaves the warehouse entirely, so there is no to_area_id.TankUnit record is updated: status = DESPACHADO and dispatched_at = now().