Asalaamualaykum:
This is my understanding on the issue and I'm sure there is a difference of opinion on this.
1.
Basically If the product is Halaal, then all departments will be considered Halaal UNLESS A PARTICULAR DEPARTMENT DEALS IN A HARAAM MODULE Example: if the financial department promotes Riba OR The marketing department (If the marketing department promotes anti-islamic values example Nudity in adverts Etc.) Then those departments will be considered as Haraam income although, the product is Halaal.
2. If the product is Haraam - This is where the scholars differ.
Opinion 2A) If the product is Haraam, then any job related to it is Haraam. This opinion will even consider the I.T Technician in a Alcohol company as having a Haraam income, based on the main income of the company is Alcohol.
Opinion 2B) If the product is Haraam - then the actual job will be investigated to see how related is the job to the Haraam product. Example: In this Opinion A Janitor in Insurance company will not be regarded as having a Haraam based income as his/her cleaning is just a service that keeps the place tidy and has nothing to do with the Insurance.
Personally - and feel free to throw this opinion in the bin, but I feel that Opinion (2A) Above, is not realistic in the current climate. The reason I say this is because it is very common in today's time that a company will produce multitudes of products and/or have sub companies that produce products. These products are a mixture of both Halaal and Haraam products. What will the common layperson do then? How will the common layperson be able to tell which of the the two, three or four bi-products or sub companies brings in most of the companies wealth ?
Hypothetical Example:
Company "Eat-me-ezee" produces the following:
1. Breakfast Cereal (Halaal)
2. Chocolates (Halaal)
3. Cakes in the fresh cream/fridge section (Haraam - due to certain ingredients)
4. A wide range of sweets called Sweet-me-ezee ( Has a ancient God picture on packaging but yet Halaal)
Here comes the million dollar question - How would a person who is applying for a janitors job in "Eat-me-ezee" view his role in the company from an Islamic point of view? How would the simple Janitor even ascertain which of sub products brings in most of the income? Do you think a "Eat-me-ezee" would even open the sales ledgers at the Janitors interview to divulge the profit and loss from each department?