public function render(Varien_Object $row) { if (empty($row['credit_history_id'])) { return ''; } $credithistory = Mage::getModel('credit/credithistory')->load($row['credit_history_id']); $transactionDetail = MW_Credit_Model_Transactiontype::getTransactionDetail($credithistory->getTypeTransaction(), $credithistory->getTransactionDetail(), true); return $transactionDetail; }
private function _getTransactionDetail() { $arr = array(); $collection = Mage::getModel('credit/credithistory')->getCollection(); foreach ($collection as $credithistory) { $transactionDetail = MW_Credit_Model_Transactiontype::getTransactionDetail($credithistory->getTypeTransaction(), $credithistory->getTransactionDetail(), true); $arr[$credithistory->getId()] = $transactionDetail; } return $arr; }
public function getTransactionDetail($type, $detail) { return MW_Credit_Model_Transactiontype::getTransactionDetail($type, $detail, false); }