MDVA-37478: Can’t create partial invoice via REST API
The MDVA-37478 patch fixes the issue when you’re unable to create a partial invoice via REST API for an order placed with payment method Payment on Account. This patch is available when the Quality Patches Tool (QPT) 1.0.23 is installed. The patch ID is MDVA-37478. Please note that the issue is scheduled to be fixed in Adobe Commerce version 2.4.3.
Affected products and versions
- The patch was designed for Adobe Commerce on cloud infrastructure 2.3.3-p1
- The patch is also compatible with Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.3.0-2.3.7
magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
Prerequisite:
Adobe Commerce with installed B2B module
Steps to reproduce:
-
Enable B2B company.
-
Enable Payment on Account payment method.
-
Create 2 simple products.
-
Create a company account.
-
Add company credits exceeding the total price of 2 products created.
-
Login to the frontend using the company account created.
-
Add the 2 products created to the cart, and checkout using the Payment on Account payment method.
-
Try to create a partial invoice for the order created via REST API:
code language-php POST /rest/V1/order//invoice { "items": [ { "order_item_id": 2, "qty": 1 } ] }
Expected results:
The partial invoice is created for an order made using the Payment on Account payment method, as expected.
Actual results:
The following error is returned from the REST API:
{"message":"Invoice Document Validation Error(s):\nAn invoice for partial quantities cannot be issued for this order. To continue, change the specified quantity to the full quantity."}
Apply the patch
To apply individual patches, use the following links, depending on your Adobe Commerce product:
- Adobe Commerce or Magento Open Source on-premises: Software Update Guide > Apply Patches in our developer documentation.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in our developer documentation.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in our support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in our support knowledge base.
For info about other patches available in QPT tool, refer to the Patches available in QPT tool section.