How do I display a custom field in an invoice?
So, I remembered that there is such a thing as Smarty calls to the CiviCRM API.

Stuck the following code into the template and bam! Got my custom field to show up in my generated invoice.

{crmAPI var='result' entity='Contribution' action='get' invoice_id="$invoice_id"}
{foreach from=$result.values item=poid}
    {$poid.custom_40}
{/foreach}