Fixing backend for registering paid invoice