-
Notifications
You must be signed in to change notification settings - Fork 7
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
Calculation of appropriate reference price #549
Comments
This commit adds ability to calculate multiple prices respecting the price inner record handling logic and selected price for sale for visualization purposes.
@lho the logic is prepared in method
|
Reimplemented logic for calculation all prices for sale function to mimic the logic in price for sale function (the original logic was flawed). Added new method for calculating all prices for sale with accompanying prices.
This issue changes behaviour of |
@novoj the GQL support, tests and user documentation are done. |
…-reference-price feat(#549): calculation of appropriate reference price
Consider following example:
We can only specify a single price in the
referencePrice: price(priceList: "basic")
part. The real use cases often work with multiple fallback price lists and need to consider the inner record handling logic of the price. So we want to extend support for the following declaration:which would take the first available price according to the passed sequence of price lists and use it as the result price for the field. The logic will also take into account the price inner record handling logic:
LOWEST_PRICE
it returns the first available price that has the sameinnerRecordId
as the price for saleSUM
, it returns the sum of the first available prices selected for each differentinnerRecordId
that also has the sale price available.This needs to be added to the
EntityContract
interface and opened both in GraphQL and consider propagating to the REST API as well (since this logic is hard to compute on the client side).The text was updated successfully, but these errors were encountered: