I came across this (apparent) idiom today and I have no idea what it means nor where it originated.

It sounds like a cross between "... to the nines" and "the ayes (or nays) have it".

Can anyone enlighten me?