Correct me if I make a mistake here.
It starts off with a tax (or trade routes).
My citzens are taxed a certain amount based on my tax slider, times any planetary economy modifers.
Then I allocate how much goes into production, and how much into reserves to pay for mantainance and whatnot.
That which goes into production I can allocate between millitary production, social production, and research.
Within each category, the funding is equally distributed among all planetary improvements of the proper type; production to factories, research to labs.
Every credit distributed to a building fills up its capacity.
When it is given enough credits, (ie: 5 for a basic factory) it no longer produces any extra benefit and the leftover credits go back to the reserves.
So functionally, the slider distinction between social and military spending dictates the split of factory production going planetside vs the stardock.
Did I get all that right? Miss anything?