Just use the general invoice type setting, no longer possible to set invoice type per post.
No idea what the use case is of this code, cleaning up.