How To Create Separate Serial for journals and invoices for each company

i need to know how to assign special serial to particular company , if i have more than 15 company.
to be automatically linked with the company