How to allocate cost and get net profit

How to get net profit amount after sale price - purchase price.

Do you mean profit & loss statement?

If so, see: Guides | Manager