Repository navigation
Inventory: ledger provenance, disposal records, auto-derivation - #384
Merged
Merged
Conversation
…items Selling or decommissioning an item now writes a disposal record (kind, date, sale proceeds, notes) instead of a bare status flip: status and disposedDate are derived from the records, so removing the last record puts the item back in use. GET/PUT responses carry the current ledger record (description, counterparty, date, amounts) each item was derived from, allocation-backed items describe themselves from their row.
Creating or editing a ledger transaction now syncs the inventory for that transaction in place of the manual scan: a physical purchase lands as an item at write time, including per-allocation rows added later by reconciliation or suggestions. Idempotent by seed, so existing items and manual edits are never overwritten.
Each item carries a ledger link that opens the transaction it came from. The status select becomes a derived badge: disposing happens in a small in-row form (sold with proceeds, or decommissioned, with date and note), and each disposal record is listed under the row where it can be removed again - removing the last one puts the item back in use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to the inventory tab:
status/disposedDateare derived from the records; removing the last record puts the item back in use. Directstatus/disposedDateedits are rejected.source— the current ledger record (description, counterparty, date, amounts) the item was derived from, per-allocation rows included. The tab renders a ledger link per row that opens the transaction.Targeted local suites: bookkeeping-inventory 12/12, api-bookkeeping 21/21, bookkeeping-suggestions 8/8, production-frontend 3/3, frontend inventory 11/11, cli bookkeeping 31/31.