Middlesbrough broke their transfer record to sign Brazilian striker Afonso Alves from Dutch side Heerenveen less than an hour before the end of the transfer window on Thursday.