(a) On termination of the contract either party may claim restitution of whatever it has supplied, provided that such party concurrently makes restitution of whatever it has received. If restitution in kind is not possible or appropriate allowance should be made in money whenever reasonable.
(b) However, if performance of the contract has extended over a period of time and the contract is divisible, such restitution can only be claimed for the period after termination has taken effect.
Principles / Restatements
Principles of European Contract Law - PECLUNIDROIT Principles of International Commercial Contracts 2016