Warehouse 0.5.3: A reason on goods issues, a setup notice and Ukrainian
Warehouse 0.5.3 gives every goods issue a reason, adds an external reference to issues, receipts and stocktakes, and warns on the warehouse pages while the setup is incomplete.
A draft goods issue now has a Reason: Production, Sale, Damage or Other. Existing issues read as production. Goods issues, goods receipts and stocktakes can also carry an External ref, a document number from another system, and a posted document’s reference cannot be used twice. Both are columns in the lists.
While the warehouse location type, a warehouse location or the default warehouse is missing, the Warehouse pages show Warehouse is not set up yet with links to Locations and the settings. Starting a stocktake without a default warehouse now says so and returns to the list instead of creating a draft without a location.
Also fixed: a goods issue posted from the admin could deadlock with another posting of the same items in the opposite order. The module now has a Ukrainian translation.
Upgrading
Run mix phoenix_kit.update: migration V2 adds the reason and external reference columns.
Full release notes: Warehouse 0.5.3
0.5.3 · 11 October 2026
Added
- Goods issue reason and
external_ref(#33) — migration chain V2 addsgoods_issues.reason(production | sale | damage | other, existing rows readproduction) and a nullableexternal_refon goods issues, goods receipts and inventory documents, each with a partial unique index over posted, non-deleted rows. The reason is editable on a draft goods issue and both fields are list columns. Runmix phoenix_kit.updateto pick up V2; rolling back never drops the columns. create_and_post/2onGoodsIssues,GoodsReceiptsandInventories(#33) — create and post in one transaction, validating before the INSERT so a refusal consumes no document number. A repeatedexternal_refanswers{:ok, :already_posted, existing}; a short goods issue reports every short line.- Module-declared source kinds (#33) — a PhoenixKit module exporting
warehouse_source_kinds/0contributes kinds toSourceKinds.list_kinds/0alongside the host’s config. - Setup notice (#34) — the Warehouse pages show a warning with links to Locations and the settings page while the warehouse location type, a warehouse location or the default warehouse is missing.
- Ukrainian (
uk) translation (#35).
Changed
- Inventory posting reads and writes the stock rows under one row lock, and posts the lines of the row read under the status lock; goods receipts write their stock rows in item order (#33).
- Inventory “new” with no default warehouse flashes and returns to the list instead of creating a draft without a location (#33).
Fixed
- Goods issues write their stock rows in item order — a draft posted from
the UI could deadlock with
create_and_post/2or another draft carrying the same items in the opposite order. - The setup notice can no longer take a page down — a malformed warehouse setting, an unmigrated Locations table or an unreachable database hides the notice instead of failing the page on mount.
- The
ukcatalogue was missing 15 strings added by #33 and #34; a test now pins everydefault.potmsgid as translated.
Warehouse 0.5.3. Install or update: {:phoenix_kit_warehouse, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.