MDVA-36572:更新贷项通知单后创建的新库存预留
受影响的产品和版本
为Adobe Commerce版本创建了修补程序:
云基础架构上的Adobe Commerce 2.4.1
与Adobe Commerce版本兼容:
Adobe Commerce(所有部署类型) 2.3.5-2.4.2-p1
NOTE
该修补程序可能适用于具有新的Quality Patches Tool版本的其他版本。 要检查修补程序是否与您的Adobe Commerce版本兼容,请将
magento/quality-patches
包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。问题
每次更新贷项通知单时,都会触发贷项通知单保留更新观察程序。 根据与PO的协议,保留更新的逻辑更改为仅在创建贷项通知单时触发。 PO将在单独票证的范围中审查通过API编辑贷项通知单的可能性。
重现步骤:
-
创建客户帐户。
-
创建简单的产品。
-
为订单创建新订单、发票和贷项通知单。
-
创建新集成。
-
检查inventory_reservation表:
code language-sql select * from inventory_reservation; +----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+ | reservation_id | stock_id | sku | quantity | metadata | +----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+ | 1 | 1 | simple_1 | -1.0000 | {"event_type":"order_placed","object_type":"order","object_id":"","object_increment_id":"000000001"} | | 2 | 1 | simple_1 | 1.0000 | {"event_type":"creditmemo_created","object_type":"order","object_id":"1","object_increment_id":"000000001"} | +----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)
-
将GET请求发送至:
../rest/default/V1/creditmemo/3
-
复制响应(示例):
code language-json { "adjustment": 0, "adjustment_negative": 0, "adjustment_positive": 0, "base_adjustment": 0, "base_adjustment_negative": 0, "base_adjustment_positive": 0, "base_currency_code": "USD", "base_discount_amount": 0, "base_grand_total": 105, "base_discount_tax_compensation_amount": 0, "base_shipping_amount": 5, "base_shipping_incl_tax": 5, "base_shipping_tax_amount": 0, "base_subtotal": 100, "base_subtotal_incl_tax": 100, "base_tax_amount": 0, "base_to_global_rate": 1, "base_to_order_rate": 1, "billing_address_id": 2, "created_at": "2021-04-05 23:43:45", "discount_amount": 0, "entity_id": 1, "global_currency_code": "USD", "grand_total": 105, "discount_tax_compensation_amount": 0, "increment_id": "000000001", "order_currency_code": "USD", "order_id": 1, "shipping_address_id": 1, "shipping_amount": 5, "shipping_incl_tax": 5, "shipping_tax_amount": 0, "state": 2, "store_currency_code": "USD", "store_id": 1, "store_to_base_rate": 0, "store_to_order_rate": 0, "subtotal": 100, "subtotal_incl_tax": 100, "tax_amount": 0, "updated_at": "2021-04-05 23:43:45", "items": [ { "base_cost": null, "base_discount_tax_compensation_amount": 0, "base_price": 100, "base_price_incl_tax": 100, "base_row_total": 100, "base_row_total_incl_tax": 100, "base_tax_amount": 0, "base_weee_tax_row_disposition": 0, "entity_id": 1, "discount_tax_compensation_amount": 0, "name": "simple_1", "order_item_id": 1, "parent_id": 1, "price": 100, "price_incl_tax": 100, "product_id": 1, "qty": 1, "row_total": 100, "row_total_incl_tax": 100, "sku": "simple_1", "tax_amount": 0, "weee_tax_applied": "[]", "weee_tax_applied_row_amount": 0, "weee_tax_row_disposition": 0 } ], "comments": [] }
-
将POST请求发送至:
../rest/default/V1/creditmemo
code language-json { "entity": --paste full response from previous step here-- }
note note NOTE 此类有效负载仅用于简化再现 — 客户在更新其自定义属性后会遇到相同问题 -
检查inventory_reservation表:
实际结果:
select * from inventory_reservation;
+----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+
| reservation_id | stock_id | sku | quantity | metadata |
+----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+
| 1 | 1 | simple_1 | -1.0000 | {"event_type":"order_placed","object_type":"order","object_id":"","object_increment_id":"000000001"} |
| 2 | 1 | simple_1 | 1.0000 | {"event_type":"creditmemo_created","object_type":"order","object_id":"1","object_increment_id":"000000001"} |
| 3 | 1 | simple_1 | 1.0000 | {"event_type":"creditmemo_created","object_type":"order","object_id":"1","object_increment_id":"000000001"} |
+----------------+----------+----------+----------+-------------------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)
预期的结果:
不会为同一贷项通知单创建第二个预留。
应用修补程序
要应用单独的修补程序,请根据您的部署类型使用以下链接:
- 在开发人员文档中,参阅Adobe Commerce或Magento Open Source内部部署: 软件更新指南>应用修补程序。
- 云基础架构上的Adobe Commerce:我们的开发人员文档中的升级和修补程序>应用修补程序。
相关阅读
要了解有关Quality Patches Tool的更多信息,请参阅:
- 已发布质量修补程序工具:用于自助提供质量修补程序的新工具。
- 使用Quality Patches Tool检查是否有可用于Adobe Commerce问题的修补程序。
有关QPT中其他可用修补程序的信息,请参阅QPT🔗中可用的修补程序部分。
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a