public function getAction()
 {
     $id = $this->getRequest()->getParam('id');
     $this->getResponse()->setHeader('Content-Type', 'application/pdf');
     $this->getResponse()->setheader('Content-disposition', 'attachment; filename="' . PowerMedia_Ifirma_Model_ApiManager::getInstance()->getDocumentPdfName($id) . '"');
     $this->getResponse()->setBody(PowerMedia_Ifirma_Model_ApiManager::getInstance()->getDocumentAsPdf($id));
 }
Esempio n. 2
0
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 3
0
 public function getGetInvoiceBillUrl()
 {
     return Mage::getModel('adminhtml/url')->getUrl('ifirma/invoice/get', array('id' => PowerMedia_Ifirma_Model_ApiManager::getInstance()->getIfirmaInvoiceMapper()->getInvoiceBillMapModel($this->getOrder()->getId())->getId()));
 }