Deduction of VAT amounts from prepayments is made by the buyer in the tax period in which the amounts of tax on purchased goods (works, services), property rights are subject to deduction, or in the tax period in which the conditions were changed or the contract was terminated and the prepayment amounts were returned.
Source: garant.ru