Fixed SQL syntax error in invoicing core class

2 jobs for sqlfix in 41 seconds (queued for 1 second)