MT#7803 Cleanup tmp after invoice generation.

(cherry picked from commit e219531acf2f82d71dafa4c35e89ce7b76e562ae)