If you place a building, which have the profits ready (a coin is displayed above them) and not yet collected, into the storage, then you will lose the profits.
The exception to this rule are the buildings from the housing category, such as houses, apartments, etc.