This commit is a continuation of the centralization of invoice state transition logic in the invoice registry.