/**
  * 
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     if ($qty = $row->getData($this->getColumn()->getId())) {
         return $qty;
     }
     $productIds = explode(',', $row->getData('all_child_product_id'));
     $POIDs = explode(',', $row->getAllPurchaseOrderId());
     $warehouseId = $this->getColumn()->getData('warehouse_id');
     return $this->_getWarehousePOQty($POIDs, $productIds, $warehouseId);
 }
 public function render(Varien_Object $row)
 {
     if ($row->getAction()) {
         return;
     }
     //get row order ids
     $purchaseorderIds = $row->getAllPurchaseOrderId();
     $filter .= 'purchaseorderids=' . $purchaseorderIds;
     $filter = base64_encode($filter);
     $orderUrl = Mage::helper("adminhtml")->getUrl('inventoryreportsadmin/adminhtml_inventoryreports/purchaseorder', array('top_filter' => $filter, '_secure' => Mage::app()->getStore()->isCurrentlySecure()));
     $html .= "<a href='' onclick='window.open( " . "\"" . $orderUrl . "\"" . "," . "\"" . $this->__('Order List') . "\"" . "," . "\"" . 'scrollbars=yes, resizable=yes, width=1000, height=600, top=50, left=300' . "\"" . "); " . "return false;' target='_blank'>" . $this->__('View Orders List') . "</a>";
     //show only in report by sku
     if ($this->getColumn()->getGrid()->isPOSKUReport()) {
         $productId = $row->getParentId() ? $row->getParentId() : $row->getProductId();
         $stockHistoryUrl = $this->getUrl('inventoryreportsadmin/adminhtml_product/chart', array('id' => $productId));
         $html = "<a href='' onclick='window.open( " . "\"" . $stockHistoryUrl . "\"" . "," . "\"" . $this->__('Stock History') . "\"" . "," . "\"" . 'scrollbars=yes, resizable=yes, width=520, height=540, top=50, left=300' . "\"" . "); " . "return false;' target='_blank'>" . $this->__('Stock History') . '</a> <br/>' . $html;
     }
     return $html;
 }