How to book restricted or temp restricted funding

How should I book restricted and unrestricted funds?Then release when spending is accomplished