It has been debated for a long time to what extent VAT needs to follow the contracts for determining the identity of the supplier and recipient of a supply. On a European level, cases like Apple and Pear Development Council and Tolsma in principle seemed to rely on contractual arrangements, while Halifax and Newey provided for exceptions where the contracts were artificial set-ups for abusive purposes.
Source