Invoice number is now substituted correctly after complete
Fix payments summary report
Update upgrade script (not tested yet)