Warehouse 0.4.0: Items are added with the catalogue's own picker
Warehouse 0.4.0 replaces the warehouse’s own “add item” window with the catalogue’s item picker on internal orders, stocktakes and transfers, so a line can be picked with its quantity in one step.
The catalogue’s item picker
Adding items to an internal order, a stocktake or a transfer now opens the same item picker the catalogue module uses, in place of the warehouse’s older window with its list and tree views. Each new line starts with the quantity chosen in the picker instead of zero. Picking an item that is already on the document still changes nothing.
The picker offers only active catalogue items, since the warehouse never stocks inactive ones. It follows the warehouse page’s language and keeps quantities with up to six decimal places, like the quantity fields of the forms. Lines already counted on a stocktake show as picked, and a picked item whose catalogue row has since been deleted is skipped instead of crashing the page.
Supplier names from the CRM
When a supplier is linked to a company in the CRM, goods receipts and supplier orders now show that company’s current name. This applies to the forms and to both lists. Before, they showed the name as it was copied when the supplier was linked.
Upgrading
Warehouse 0.4 needs Catalogue 0.18 or later, the first release with the item picker. There is no migration. Nothing changes in stock or in the documents themselves. An app that builds the mdex_native library from source with MDEX_NATIVE_BUILD=1 has to declare rustler itself.
Full release notes: Warehouse 0.4.0
0.4.0 · 22 August 2026
Added
- Item adding on internal orders, stocktakes, and transfers now goes
through the catalogue’s
ItemSelectorModal(#23). The warehouse-localadd_picker/1(tree/search/add UI that never touched a stock-specific field) is gone. Confirming a selection seeds each new line with the picked quantity instead of always starting at zero; re-adding an already-present item is still a no-op.
Changed
- ⚠️ Requires
phoenix_kit_catalogue ~> 0.18.ItemSelectorModalfirst shipped in catalogue 0.18.0. The previous~> 0.13pin would still resolve 0.13–0.17, which this package cannot compile against. Locked in withtest/catalogue_pin_conformance_test.exs. - Documentation now matches the actual dependency contract. The
PhoenixKitWarehousemoduledoc claimedPhoenixKitComments“stays optional (guarded viaCode.ensure_loaded?/1)”, andAGENTS.mdsaid the same. Neither was true:phoenix_kit_commentsis not declaredoptional:inmix.exs, and six form LiveViewsuse PhoenixKitComments.Embed, which is macro expansion at compile time and cannot be guarded. All four sibling packages are now described as hard dependencies, with the distinction a reader actually needs spelled out — a hard package dependency is not a required module, andrequired_modules/0lists only"catalogue"and"locations". The moduledoc also no longer implies billing is enablement-checked; it isn’t, its component is imported unconditionally. PhoenixKitWarehouse.Comments’ moduledoc now states what “unavailable” covers (installed-but-disabled) and what it does not (version skew —available?/0returnstrueagainst comments 0.2.6/0.2.7, wheresubscribe/2and the batchcount_comments/2do not yet exist; the>= 0.2.8floor is what closes that, not any guard in the module). TheCode.ensure_loaded?/1check and the@compile {:no_warn_undefined, ...}attribute are labelled as the always-true residue they are.- Dependency updates (
phoenix_kit2.13.6,phoenix_kit_catalogue0.18.0,rustler0.38.0).
Fixed
mdex_nativeforce-builds underMDEX_NATIVE_BUILD=1(#20). Declaresrustleras an optional Hex dep, matchingphoenix_kit’s ownmix.exs, so a clean checkout of this repo can compile the NIF from source on OTP 28 (no precompiled artefact). A host application still has to declarerustleritself — optional deps of deps are never resolved.- Supplier names on goods receipts and supplier orders resolve through
CRM when the local row is linked (#21).
Catalogue.resolve_supplier/1replacesget_supplier/1on the two form LiveViews, so acrm_company_uuidlink shows the party’s current name instead of the local snapshot. Post-merge: the two index LiveViews had the same stale snapshot (they usedlist_suppliers/0); both now callresolve_suppliers/1. - Eight top-level admin tabs set
visible: trueexplicitly (#22). Core 2.6.0 made an unsetTab.visiblemean “auto” (nil), and this module’s own test was reading the raw field, so the 8 nav tabs looked hidden to the suite. The rendered sidebar was never affected. Also corrects the hardcoded tab count 37 → 38 (Turnover). - ItemSelectorModal host wiring (review of #23): already-counted
stocktake lines round-tripped through JSONB as strings were dropped from
the modal’s
selectedmap (Decimal-only match), so they looked pickable again; all three LiveViews now coerce throughStockLedger.to_decimal/1. Scope is%{statuses: ["active"]}(warehouse never stocks inactive items). Locale andqty_precision: 6are passed through so the modal matches the warehouse@localeandstep="any"quantity inputs. A pick whose catalogue row is gone is skipped instead of crashing the LiveView viaget_item!/1.
Warehouse 0.4.0. Install or update: {:phoenix_kit_warehouse, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.