Skip to content

Instantly share code, notes, and snippets.

@centerax
Created October 28, 2013 14:48
Show Gist options
  • Save centerax/7197998 to your computer and use it in GitHub Desktop.
Save centerax/7197998 to your computer and use it in GitHub Desktop.
<?php
class Ebizmarts_SageOne_Block_Adminhtml_Sales_Order_Creditnote_Note extends Mage_Core_Block_Template {
public function getCreditMemo() {
return Mage::registry('current_creditmemo');
}
/**
* Render block HTML
*
* @return string
*/
protected function _toHtml() {
//Return empty if invoiceId is not present
if(!is_null($this->getCreditMemo()) && !is_null($this->getCreditMemo()->getInvoice()) && !$this->getCreditMemo()->getInvoice()->getSageoneInvoiceId()) {
return '';
}
return parent::_toHtml();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment