Example #1
0
 public function render(Varien_Object $row)
 {
     $purchaseorderHistoryId = $row->getPurchaseOrderHistoryId();
     $resource = Mage::getSingleton('core/resource');
     $readConnection = $resource->getConnection('core_read');
     $sql = 'SELECT distinct(`field_name`) from ' . $resource->getTableName("erp_inventory_purchase_order_history_content") . ' WHERE (purchase_order_history_id = ' . $purchaseorderHistoryId . ')';
     $results = $readConnection->fetchAll($sql);
     $content = '';
     foreach ($results as $result) {
         $content .= $result['field_name'] . '<br />';
     }
     return $content;
 }
 public function render(Varien_Object $row)
 {
     $purchaseOrderHistoryId = $row->getPurchaseOrderHistoryId();
     //        $url = $this->getUrl('inventorypurchasingadmin/adminhtml_purchaseorders/showhistory');
     return '<p style="text-align:center"><a name="url" href="javascript:void(0)" onclick="showhistory(' . $purchaseOrderHistoryId . ')">' . Mage::helper('inventorypurchasing')->__('View') . '</a></p>
             ';
     //                <script type="text/javascript">
     //                    function showhistory(purchaseOrderHistoryId){
     //                        var purchaseOrderHistoryId = purchaseOrderHistoryId;
     //                        var url = "'.$url.'purchaseOrderHistoryId/"+purchaseOrderHistoryId;
     //                        TINY.box.show(url,1, 800, 400, 1);
     //                    }
     //                </script>
 }