Skip to content

refactor(finance): modular rules#257

Draft
chrisflav wants to merge 1 commit into
mainfrom
cm-finance-refactor
Draft

refactor(finance): modular rules#257
chrisflav wants to merge 1 commit into
mainfrom
cm-finance-refactor

Conversation

@chrisflav

Copy link
Copy Markdown
Owner

We replace the hardcoded financial rules by configurable rules: A bill generator is a rule that produces a list of bills based on the parameters of a statement. A automatic bill configuration is a lists of bill generators.

The rules are configured using JSONata.

Closes #251

Remaining TODOs:

  • Complete the serialization of statements, excursions, members etc: Replace __all__ by curated list of fields, add fields for useful properties. Document the serialization interface.
  • Add JSONata validation to BillGenerator admin (maybe allow testing directly in the admin change view?)
  • Add translations, help texts, show models properly in admin.
  • Improve visualisation of rule outputs in the overview.
  • Clean up the old hardcoded logic and verify the new rule based setup can re-implement the old logic.
  • Document the rule syntax and the available parameters, provide more examples.

@github-actions

Copy link
Copy Markdown

📚 Documentation deployed!

Documentation: https://chrisflav.github.io/kompass/cm-finance-refactor/

Docker Images:

  • App: ghcr.io/chrisflav/kompass:pr-257
  • Nginx: ghcr.io/chrisflav/kompass-nginx:pr-257

Add the awaiting-deployment label to deploy this PR to a staging server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make finances modular

1 participant