fayeraye,
It has nothing to do with contracts. Take for example the product you are making requires Lavender and Aloe (this is just for clarification, not a true formula). If another factory produces a product which also needs Aloe and Lavender besides other ingredients, this will take away some inventory of those ingredients. As you travel from city to city your inventory is constantly changing. I was working on a quest and thought I had everything required. I checked my inventory and realized that some of the products were no longer there. I don't know how else to explain this problem. I will say again check your inventory of ingredients and products constantly. Sometimes you will not be able to see everything you have. In that case you have to look at your factories and determine what products and inventory are being used.
Good luck!