...
First you need to ensure your smarty have PHP handling enabled (read related article: Templates: Integrating templates - tips and tricks)
Then go to Settings → General Setting → Billing → Document Templates → Invoice customization and edit your current invoice template. Click on [HTML] button to edit source.
...