Repository navigation
feat(ledger): allocation share reads and record_acquisition - #276
Merged
Merged
Conversation
`get_allocation_share(graph_id, entity_id, period)` reads a member's month as the consolidation engine will: its result, the outside owners' pro-rata share, the override if one is set, the share the entries use, and whether the month is closed. `list_allocation_overrides` lists the months an override is set for. `record_acquisition` records a member bought from its owners. Regenerated against robosystems feature/group-acquisition; the residual gains its `cause`. The twin of typescript-client #292. Claude-Session: https://claude.ai/code/session_01VPxBBHkqhwkZ6Eq8EXSBR6
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.
Summary
Facade methods for two backend additions in robosystems
feature/group-acquisition: the allocation share reads behind roboledger-app's allocation-override form, andrecordAcquisitionfor a member bought from its owners.Changes
get_allocation_share(graph_id, entity_id, period)→AllocationShare | None: the member's month result, the outside owners' pro-rata share, the override if set, the share the consolidating entries use (effectiveAmount), andclosed. Amounts in cents.list_allocation_overrides(graph_id, entity_id)→list[AllocationOverride], oldest month first.record_acquisition(graph_id, entity_id=, consideration=, basis=, nci_fair_value=, allocations=, confirm_bargain_purchase=); returns the drafted acquisition with its goodwill.RecordAcquisitionRequest,AcquisitionResponse,AcquisitionAllocation, andcauseonConsolidationResidual. All additive.Release
Generated tier plus new facade methods, no break: a client minor. It waits on the robosystems release that carries
feature/group-acquisition(after v1.19.6): until then the GraphQL fields and the operation do not exist on the server. The twin of typescript-client #292.Testing
tests/test_ledger_client.py:record_acquisitionsends the body;get_allocation_shareparses the share and sends the variables;list_allocation_overridesunwraps, empty when none. Ruff, basedpyright and the suite (725) pass; the GraphQL schema snapshot refreshed and codegen regenerated. Regenerated against the local API on the backend branch.🤖 Generated with Claude Code
https://claude.ai/code/session_01VPxBBHkqhwkZ6Eq8EXSBR6