[FIX] Change registration state to registered only when in draft. [ADD] Hook just before invoice creation.