Repository navigation
Commit ee22858
authored
feat: create_journal_entry tags a consolidating entry (#265)
## Summary
`create_journal_entry` can now tag a consolidating entry posted in a
reporting group's consolidation entity. It names what the entry adjusts
(`adjustment_kind`) and the entity whose figures it adjusts
(`adjusts_entity_id`). The consolidation engine counts a tagged entry
toward what the group already holds, so an elimination posted by hand is
not proposed again. Without the tags, it could be proposed and posted
twice. The API has accepted and validated both fields since
consolidation C2; the facade had no way to send them.
## Changes
- Hand-written facade (`robosystems_client/clients/ledger_client.py`):
`create_journal_entry` takes optional `adjustment_kind` and
`adjusts_entity_id` and carries them in the `journal_entry_recorded`
metadata. They're sent only when set.
- No generated code changed. There is no async variant of this facade.
## Compatibility
ADDITIVE: two new optional keyword arguments, and nothing is sent unless
they are passed. The server already accepts both fields in production.
## Testing
- `just test-all` passes: 699 passed, 17 skipped; ruff, format,
basedpyright clean.
- New tests: a tagged entry carries both fields in its metadata, and an
untagged entry carries neither.
Companion PRs: RoboFinSystems/robosystems-typescript-client (the same
option on `createJournalEntry`), RoboFinSystems/roboledger-app (the
journal entry modal on the consolidation entity).
🤖 Generated with [Claude Code](https://claude.com/claude-code)2 files changed
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2043 | 2043 | | |
2044 | 2044 | | |
2045 | 2045 | | |
| 2046 | + | |
| 2047 | + | |
2046 | 2048 | | |
2047 | 2049 | | |
2048 | 2050 | | |
| |||
2065 | 2067 | | |
2066 | 2068 | | |
2067 | 2069 | | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
2068 | 2077 | | |
2069 | 2078 | | |
2070 | 2079 | | |
| |||
2082 | 2091 | | |
2083 | 2092 | | |
2084 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
2085 | 2098 | | |
2086 | 2099 | | |
2087 | 2100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
812 | 844 | | |
813 | 845 | | |
814 | 846 | | |
| |||
0 commit comments