Currently the last cost price is the cost price used on the purchase order when you receive that stock in. Until you receive an invoice for the stock (which is usually a few weeks after receiving stock in) the cost price is not confirmed. Therefore the last cost price does not show correctly if the invoice is different to that on the purchase order.
This means when looking at a product margin it is incorrect as the last cost price is not taking into account the cost the supplier actually charged. The last cost price is looking at the cost you assumed the product was when you received the stock in.