Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow automatic full invoice from API #2393

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -120,7 +120,7 @@ public function info($invoiceIncrementId)
* @param boolean $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 @@ -37,7 +37,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