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

Allow to explicitly disable the automatic AccountancyEntry-creation via property #296

Open
JonasDeepe opened this issue Dec 12, 2019 · 2 comments
Assignees
Labels
in: configuration Everything related to Spring configuration lifecycle: feedback requested Information missing module: accountancy Accountancy type: enhancement Improvements and new features

Comments

@JonasDeepe
Copy link

Similar to Issue #253 it should also be possible to disable the AccountancyOrderEventListener.

@odrotbohm
Copy link
Member

Can you elaborate on a use case?

@odrotbohm odrotbohm self-assigned this Dec 16, 2019
@odrotbohm odrotbohm added in: configuration Everything related to Spring configuration lifecycle: feedback requested Information missing module: accountancy Accountancy type: enhancement Improvements and new features labels Dec 16, 2019
@JonasDeepe
Copy link
Author

I can think of at least two use cases, where you would want to create your own EventListener to replace the standard one since you can't modify it, and therefore would need to deactivate it:

  • Firstly, if you wanted the ProductPaymentEntries to have a different description.
    (There is an inconsistency by the way: the desription of a new ProductPaymentEntry is in german, while the description of a cancelled one is in english.)

  • Secondly, if you wanted some custom objects to reference individual ProductPaymentEntries as part of your invoice-management-implementation, it would be useful to create these custom objects whenever a new ProductPaymentEntry is created, and also right where it is created, so that you would immediately have a reference to the new ProductPaymentEntry, as you can't search the Accountancy for a ProductPaymentEntry with a specific OrderIdentifier, since it also contains basic AccountancyEntries which do not have one.
    Creating another ProductPaymentEntry in your own EventListener to reference it and not using the by-default-created one, would be nonsense as there would be two ProductPaymentEntries for every completed Order in the Accountancy. And iterating over all AccountancyEntries in the Accountancy to find the one that just got newly created (somewhat similar to what my code does now) is also bad practice, as in theory the database could be located at a different place than the server, so you wouldn't want to request all its content (which would take some time) just to use on element of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: configuration Everything related to Spring configuration lifecycle: feedback requested Information missing module: accountancy Accountancy type: enhancement Improvements and new features
Projects
None yet
Development

No branches or pull requests

2 participants