Developer forum

Forum » Development » How to calculate the lowest price?

How to calculate the lowest price?

Anders Ebdrup
Anders Ebdrup
Reply

Hi,

 

We have a requirement for calculating the lowest price for a customer, which means calculating the overall lowest price including discounts. So the lowest price found in the EcomPrices-table may not be the lowest as a customer can be related to a group which gives a discount on a more expensive price from EcomPrices.

Note: This calculation method should be supported by Business Central and need to have the same price logic.

 

Any idea of how that can be achieved?

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Hi Anders

That would not be an easy task...

Our logic now is find the lowest available price and then find discounts.

We would have to change that to find all prices, calculate all discounts, find lowest price.

But - how do you set a discount that targets a specific price? I do not see that connection in our current setup... You set the discount on a user group, customer numer, currency or something like that. And you can add the same logic to the prices.

BR Nicolai

 

You must be logged in to post in the forum