/** * Draw one line - rma item * * @param Enterprise_Rma_Model_Item $item * @param Zend_Pdf_Page $page */ protected function _drawRmaItem($item, $page) { $shift = 0; foreach (Mage::helper('core/string')->str_split($item->getProductName(), 40, true, true) as $key => $part) { $page->drawText($part, $this->getProductNameX(), $this->y - $shift, 'UTF-8'); $shift += 10; } $shift = 0; foreach (Mage::helper('core/string')->str_split($item->getProductSku(), 18) as $key => $part) { $page->drawText($part, $this->getProductSkuX(), $this->y - $shift, 'UTF-8'); $shift += 10; } $condition = Mage::helper('core/string')->str_split($this->_getOptionAttributeStringValue($item->getCondition()), 25); $page->drawText($condition[0], $this->getConditionX(), $this->y, 'UTF-8'); $resolution = Mage::helper('core/string')->str_split($this->_getOptionAttributeStringValue($item->getResolution()), 25); $page->drawText($resolution[0], $this->getResolutionX(), $this->y, 'UTF-8'); $page->drawText(Mage::helper('enterprise_rma')->parseQuantity($item->getQtyRequested(), $item), $this->getQtyRequestedX(), $this->y, 'UTF-8'); $page->drawText(Mage::helper('enterprise_rma')->getQty($item), $this->getQtyX(), $this->y, 'UTF-8'); $status = Mage::helper('core/string')->str_split($item->getStatusLabel(), 25); $page->drawText($status[0], $this->getStatusX(), $this->y, 'UTF-8'); $productOptions = $item->getOptions(); if (is_array($productOptions) && !empty($productOptions)) { $this->_drawCustomOptions($productOptions, $page); } $this->y -= 10; }