Inventory item sale and purchase rate

How possible that update purchase rate automatically in inventory item .example i enter product new and entr purchase and sale rate then if I purchase same item in different rate then how I update this new rate automatically

It’s not automatic - you have to enter the new rate