Skip to content

Commit

Permalink
Allowed automatic full invoice from API (#2393)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigifab authored Oct 5, 2022
1 parent 260eb87 commit 52f2c75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Sales/Model/Order/Invoice/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function info($invoiceIncrementId)
* @param bool $includeComment
* @return string
*/
public function create($orderIncrementId, $itemsQty, $comment = null, $email = false, $includeComment = false)
public function create($orderIncrementId, $itemsQty = [], $comment = null, $email = false, $includeComment = false)
{
$order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Sales/Model/Order/Invoice/Api/V2.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Mage_Sales_Model_Order_Invoice_Api_V2 extends Mage_Sales_Model_Order_Invoi
* @param bool $includeComment
* @return string
*/
public function create($invoiceIncrementId, $itemsQty, $comment = null, $email = false, $includeComment = false)
public function create($invoiceIncrementId, $itemsQty = [], $comment = null, $email = false, $includeComment = false)
{
$order = Mage::getModel('sales/order')->loadByIncrementId($invoiceIncrementId);
$itemsQty = $this->_prepareItemQtyData($itemsQty);
Expand Down

0 comments on commit 52f2c75

Please sign in to comment.