The only free and comprehensive online etymological dictionary of the Spanish language
haber (Verb) "to have"

12th cent. Old Spanish aver. From Latin habere "to have," "to hold." From Proto-Italic *χab-ē 'id.' From Proto-Indo-European *ghh1b-(e)i̯- 'id.' The phonology of this word is exceptional as the presence of *b was rare in Proto-Indo-European.

Romance: Western Vulgar Latin: Asturian haber, Portuguese haver, Galician haber, Catalan haver, French avoir, Italian avere; Eastern Vulgar Latin: Aromanian amu, Romanian avea; Sardinian àere

The spelling change from aver to haber was a modern modification to more closely reflect the original Latin.