Helper/Data.php
public function getTemplateStatus(Invoice $invoice)
    {
        $invoiceStore = $invoice->getOrder()->getStoreId();
        $collection = $this->collection();
        $collection->addStoreFilter($invoiceStore);
        $collection->addFieldToFilter('is_active', TemplateActive::STATUS_ENABLED);
        $collection->addFieldToFilter('template_default', AbstractSource::IS_DEFAULT);

        return $collection->getLastItem();
    }
public function getTemplateStatus(Invoice $invoice)
    {
        $invoiceStore = $invoice->getOrder()->getStoreId();
        $collection = $this->collection();
        $collection->addStoreFilter($invoiceStore);
        $collection->addFieldToFilter('is_active', TemplateActive::STATUS_ENABLED);
        $collection->addFieldToFilter('template_default', AbstractSource::IS_DEFAULT);

        return $collection->getLastItem();
    }
public function getTemplateStatus ( Invoice $ invoice ) { $ invoiceStore = $ invoice -> getOrder ( ) -> getStoreId ( ) ; $ collection = $ this -> collection ( ) ; $ collection -> addStoreFilter ( $ invoiceStore ) ; $ collection -> addFieldToFilter ( 'is_active' , TemplateActive :: STATUS_ENABLED ) ; $ collection -> addFieldToFilter ( 'template_default' , AbstractSource :: IS_DEFAULT ) ; return $ collection -> getLastItem ( ) ; }
Get the active template

@param $invoice
@return \Magento\Framework\DataObject
Get the active template