Fix send invoice

Fix for issue #1045.
The wrong object was used.