2012-12-27 56 views

回答

0

这意味着你没有选择你需要的,如果你看一下,让这个错误在以下文件

app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php:88:    Mage::throwException($this->__('Cannot create an invoice without products.')); 

你看到这个错误时给出的代码开发票产品没有物品被发现

  $savedQtys = $this->_getItemQtys(); 
      $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice($savedQtys); 
      if (!$invoice->getTotalQty()) { 
       Mage::throwException($this->__('Cannot create an invoice without products.')); 
      } 

,你也可以看到,项目从您的文章

012看着
/** 
    * Get requested items qty's from request 
    */ 
    protected function _getItemQtys() 
    { 
     $data = $this->getRequest()->getParam('invoice'); 
     if (isset($data['items'])) { 
      $qtys = $data['items']; 
     } else { 
      $qtys = array(); 
     } 
     return $qtys; 
    } 

这意味着您没有选择或发布任何需要发布到此方法的需求。

相关问题