# `PhoenixKitWarehouse.ColumnConfig.Stock`
[🔗](https://github.com/BeamLabEU/phoenix_kit_warehouse/blob/0.4.0/lib/phoenix_kit_warehouse/column_config/stock.ex#L1)

Column registry for the warehouse stock-balances ("In stock") flat list LiveView.

Operates on enriched flat stock maps of shape `%{item, display_name, sku,
catalogue_name, category_name, unit_label, quantity, unit_value,
total_value, min_quantity, available, below_min?}` where `quantity`,
`unit_value`, `total_value`, `min_quantity`, and `available` are `Decimal`
(or nil for value columns), `below_min?` is boolean, and the rest are
strings.

`min_quantity` / `available` / `below_min?` come from
`PhoenixKitWarehouse.Deficits` and `PhoenixKitWarehouse.MinStockSettings`
(§5, deficit tracking) — deliberately global-per-item (summed across every
warehouse), not scoped to the current `warehouse_scope`, same as
`Deficits.available_by_item/0` itself.

# `all_column_ids`

```elixir
@spec all_column_ids() :: [String.t()]
```

# `available_columns`

```elixir
@spec available_columns() :: [map()]
```

Ordered list of column metadata maps. Used by the picker modal.

# `column_metadata_map`

```elixir
@spec column_metadata_map() :: %{required(String.t()) =&gt; map()}
```

Map `%{id => meta}` for fast lookup during a single render pass.

# `default_columns`

```elixir
@spec default_columns() :: [String.t()]
```

# `scope`

```elixir
@spec scope() :: String.t()
```

# `validate_columns`

```elixir
@spec validate_columns([String.t()]) :: [String.t()]
```

Filter input list to known column ids, preserving order.

# `validate_filters`

```elixir
@spec validate_filters([String.t()]) :: [String.t()]
```

Filter input list to known *filterable* column ids, preserving order.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
