In pure exchange GE models, a typical goods market clearing condition for good $n$ looks like:
$$\sum\limits_{i=1}^Ic_n^i=\sum\limits_{i=1}^Ie_n^i.$$
Consider a model with production where firms can pay dividends and invest in new capital. New capital can be produced from output goods using a linear technology.
My Question: Taking the existence of dividends and investment into account, how does the goods market clearing condition look like in this case?