As others have said, this is something you could probably do in a spreadsheet, but I would expect that to become unwieldy as your business grows and/or your BOMs start getting bigger. You might want to look into some sort of Enterprise Resource Planning (ERP) system. There are some open source options that you could run yourself. However, ERP systems are comprehensive suites of tools for operating a business, which might be a lot more than what you need right now.