Cash flow Statements are all about inflows and outflows of cash. So the whole inflow is recorded.
and the proceeds of the sale and gain and loss and depreciation appears on income statement (not CFI). this is Cash flow from investment all other things doesnt show up here.
CFI only contains the cash in flow and out flow from investment. The gains and other stuff is not reported here. In fact they are adjusted in the calculation of CFO when gains are part of NI and indirect method is used. But here in CFI the sale proceeds are recorded as inflow irrespective of gain or loss and investments are recorded as outflows.