Finish create invoice function