Skip to content

Commit 9a252e4

Browse files
committed
MAGETWO-54693: Ability to return the product to the stock after Creditmemo API
1 parent 4426b0f commit 9a252e4

File tree

1 file changed

+2
-1
lines changed
  • app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment

1 file changed

+2
-1
lines changed

app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/Save.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ public function execute()
107107
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setCommentText($data['comment_text']);
108108
}
109109

110+
$isNeedCreateLabel = isset($data['create_shipping_label']) && $data['create_shipping_label'];
111+
110112
try {
111113
$this->shipmentLoader->setOrderId($this->getRequest()->getParam('order_id'));
112114
$this->shipmentLoader->setShipmentId($this->getRequest()->getParam('shipment_id'));
@@ -140,7 +142,6 @@ public function execute()
140142

141143
$shipment->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
142144
$responseAjax = new \Magento\Framework\DataObject();
143-
$isNeedCreateLabel = isset($data['create_shipping_label']) && $data['create_shipping_label'];
144145

145146
if ($isNeedCreateLabel) {
146147
$this->labelGenerator->create($shipment, $this->_request);

0 commit comments

Comments
 (0)