Refeesh,
You should be able to take the Life to Date Depreciation from my code minus the Year to Date Depreciation to get the Life to Date Depreciation as of the end of 2012 (the prior year). Then you can subtract that result (Life to Date Depreciation as of the end of 2012) from the Acquisition Cost to get the Net Book Value at the end of 2012.