Creating a PDF Invoice based on conditions

I have a line item table which has connections to the “manufacturer” table, and that manufacturer table has an assigned “contact person” table. I want to make an invoice and combined all line items to order from each contact based on whom they belong to using automation task, the regular scenario is that I have 100 orders from different manufacturer, and I want to combined all line items per manufacturer, when order comes, then I can send the invoice pdf after the automation combine orders from the same manufacturer (source of the item)

Remember: each order contains 100 items, and not from the same source, it has multiple location, but the customer orders from us directly and we get it from different manufacturers, how can we make that possible? We don’t like to get any third-party that’s why we have tadabase for this… Please help.

I want to make sure everyone can follow what you’re trying to achieve here. Maybe you can give some more info about your processes.

I understand you get orders from customers that may include items from multiple manufacturers.

Are you wanting to combine items ordered from each manufacturer that may come from different orders and “invoice” them - or order them from each manufacturer?

Are we talking about physical products? Do you take possession of these items and then fulfill your customer orders, do the manufacturers ship directly to your customers? Will you need to break manufacturer orders down into customer orders at some point?