Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Journal: refactor periodicity of Account & LineItem in terms of Journal #16

Open
4 of 6 tasks
bayprogrammer opened this issue Aug 29, 2023 · 0 comments
Open
4 of 6 tasks
Assignees
Labels
enhancement New feature or request

Comments

@bayprogrammer
Copy link
Member

bayprogrammer commented Aug 29, 2023

Once we have a Journal parent object which sets the accounting period it makes no sense to have an idea of a "global" period. The period is per-journal, not per application. Obviously if an application that uses this library wants, they can use a single period everywhere, but it will have to be done in that case explicitly.

  • remove fallback to JournalPeriod when period not specified in LineItem scopes
  • remove fallback to JournalPeriod when period not specified in Account scopes
  • fallback to parent Journal when period not specified in LineItem scopes
  • fallback to parent Journal when period not specified in Account scopes
  • JournalPeriod remove support for global periodicity fallback
  • configs remove support for configuring global periodicity fallback
@bayprogrammer bayprogrammer added the enhancement New feature or request label Aug 29, 2023
@bayprogrammer bayprogrammer self-assigned this Aug 29, 2023
bayprogrammer added a commit that referenced this issue Sep 1, 2023
Now that we have a `Journal` model (which "owns" `Account` models) we
should update our testing helpers to account for the journal instances
more explicitly. This PR does just that.

Also we add the notion of a 'current period' to `Journal` and remove the
notion of a globally configured "accounting period": a `Journal` now
controls what is the current accounting period in any given context for
objects which descend from it (accounts, line items, etc.). Later work
can further modify existing scopes to require that journal object to use
as a fallback when a more specific period is not needed (and to ensure
all e.g. ledger line items are always scoped to a specific journal).

Related to #16. Closes #19.

-----

Automated Test Results:

OK (191 tests, 319 assertions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant