We consider the joint cost allocation problem that arises when several lots or resources are available to serve different products or divisions. We provide a two-phase model, wherein the first phase the optimal set of lots to be acquired is chosen and given the optimal set, and the products using each acquired lot is also determined. In the second phase, a stable full cost allocation method is developed that will not induce the divisions to form coalitions to reduce the allocated joint costs. Utilizing the optimal dual solution of the lot selection phase, we provide a joint cost allocation mechanism based on the concept of propensity to contribute and show that this allocation is also stable. If in the first phase there is a dual gap, then we show that there is no cost allocation in the core. A numerical illustration is provided.