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

Add ability to have ChargeLines that refer to OrderLines #226

Closed
odrotbohm opened this issue Nov 22, 2018 · 1 comment
Closed

Add ability to have ChargeLines that refer to OrderLines #226

odrotbohm opened this issue Nov 22, 2018 · 1 comment
Assignees
Milestone

Comments

@odrotbohm
Copy link
Member

Some lab projects would like to attach ChargeLine instances to individual OrderLines to e.g. attach additional services to a particular line item. We should introduce means to create specialized ChargeLines and the ability to find all ChargeLines that are attached to a particular OrderLine.

Implementation ideas:

  • switch to List instances for OrderLines and ChargeLines in Order.
  • add custom ChargeLine that has a reference to an OrderLine
  • add API to add such ChargeLine to an Order
  • add API to look up all ChargeLines attached to an OrderLine
@odrotbohm odrotbohm added this to the 7.1 milestone Nov 22, 2018
@odrotbohm odrotbohm self-assigned this Nov 22, 2018
odrotbohm added a commit that referenced this issue Nov 22, 2018
Order now exposes API to attach AttachedChargeLine instances to an OrderLine by either an instance or its index in the order's list of OrderLines. It also exposes API to look up all AttachedChargeLine instance for an OrderLine.

Introduced Totalable<T extends Priced> to easily allow summing up an Iterable of Priced instances. All methods returning (Attached)ChargeLine instances now use that for convenience. Deprecated a couple of methods in Order for better alignment.
@odrotbohm
Copy link
Member Author

This is in place in 7.1.0.BUILD-SNAPSHOT, feel free to give the snapshots a spin.

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

No branches or pull requests

1 participant