Created
October 28, 2013 14:48
-
-
Save centerax/7197998 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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