Skip to content

Commit

Permalink
ENGCOM-3828: Fixed issue #19942 Success message is not showing when c…
Browse files Browse the repository at this point in the history
…reating invoice & shipment simultaniously #20142

 - Merge Pull Request #20142 from Surabhi-Cedcoss/magento2:2.3-develop-pr3
 - Merged commits:
   1. e6c41ba
  • Loading branch information
magento-engcom-team committed Jan 11, 2019
2 parents d7ac52b + e6c41ba commit 0aa8296
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ public function execute()
}
$transactionSave->save();

if (!empty($data['do_shipment'])) {
$this->messageManager->addSuccessMessage(__('You created the invoice and shipment.'));
} else {
$this->messageManager->addSuccessMessage(__('The invoice has been created.'));
}

// send invoice/shipment emails
try {
if (!empty($data['send_email'])) {
Expand All @@ -219,6 +213,11 @@ public function execute()
$this->messageManager->addErrorMessage(__('We can\'t send the shipment right now.'));
}
}
if (!empty($data['do_shipment'])) {
$this->messageManager->addSuccessMessage(__('You created the invoice and shipment.'));
} else {
$this->messageManager->addSuccessMessage(__('The invoice has been created.'));
}
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->getCommentText(true);
return $resultRedirect->setPath('sales/order/view', ['order_id' => $orderId]);
} catch (LocalizedException $e) {
Expand Down

0 comments on commit 0aa8296

Please sign in to comment.