public function copyAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper('layout')->disableLayout();
     $request = $this->getRequest();
     if ($request->isPost()) {
         $id = (int) $this->_getParam('id', 0);
         $position = new Purchases_Model_DbTable_Quoterequestpos();
         $data = $position->getPosition($id);
         $orderings = $this->getOrdering($data['quoterequestid']);
         foreach ($orderings as $ordering => $positionId) {
             if ($ordering > $data['ordering']) {
                 $position->updatePosition($positionId, array('ordering' => $ordering + 1));
             }
         }
         $data['ordering'] += 1;
         $data['created'] = $this->_date;
         $data['createdby'] = $this->_user['id'];
         $data['modified'] = '0000-00-00';
         $data['modifiedby'] = 0;
         unset($data['id']);
         $position->addPosition($data);
         //Calculate
         $this->_helper->Calculate($data['quoterequestid'], $this->_currency, $this->_date, $this->_user['id']);
     }
 }