Margin modul wrong rices for margin

Hi there,
i am using the Dolibarr for about 3 years and really don’t have any seriously problems. Because my business is growing and growing i decided to install the Margin module and i notice something that shouldn’t happen: when that module calculates the margin of a product or service it takes the price from the product/service carton (both selling and buying). My selling price for the product/service are constant each time but the buying price is different each time. So, the margin rate that calculates is wrong because one of the price is incorrect (i mean the buying price).
So, is there any chance this module to take the prices for the margin rates on the method FIFO (first in first out) since the system is storing information in the storage module and keep information about the each pc. of a product and the price that is payed for it?

Thanks!

Hi Nikolay

Can you give me the link of the margin module you use to see this ? Which version do you have ? (3.7.1)

Regards

Philippe