Costs's against an invoice

Costs's against an invoice

Is it possible to assign cost's against an invoice so that you can keep track of the Profit and Loss on an invoice? And if so can you then assign these cost's a purchase order and such information like supplier etc...?