From f282ad13b639b09167f6b242f92d646cefd5cba9 Mon Sep 17 00:00:00 2001 From: Jeroen van Leusden Date: Wed, 27 Dec 2017 09:51:27 +0100 Subject: [PATCH] Remove unused if statement in order invoice save $shippingResponse is undefined in scope. --- .../Sales/Controller/Adminhtml/Order/Invoice/Save.php | 9 +-------- app/code/Magento/Sales/i18n/en_US.csv | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php index 63c266150384a..c45a1982784e1 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php @@ -191,14 +191,7 @@ public function execute() } $transactionSave->save(); - if (isset($shippingResponse) && $shippingResponse->hasErrors()) { - $this->messageManager->addError( - __( - 'The invoice and the shipment have been created. ' . - 'The shipping label cannot be created now.' - ) - ); - } elseif (!empty($data['do_shipment'])) { + if (!empty($data['do_shipment'])) { $this->messageManager->addSuccess(__('You created the invoice and shipment.')); } else { $this->messageManager->addSuccess(__('The invoice has been created.')); diff --git a/app/code/Magento/Sales/i18n/en_US.csv b/app/code/Magento/Sales/i18n/en_US.csv index 6568284300225..a32f3cacce756 100644 --- a/app/code/Magento/Sales/i18n/en_US.csv +++ b/app/code/Magento/Sales/i18n/en_US.csv @@ -233,7 +233,6 @@ Sales,Sales "You can't create an invoice without products.","You can't create an invoice without products." "New Invoice","New Invoice" "We can't save the invoice right now.","We can't save the invoice right now." -"The invoice and the shipment have been created. The shipping label cannot be created now.","The invoice and the shipment have been created. The shipping label cannot be created now." "You created the invoice and shipment.","You created the invoice and shipment." "The invoice has been created.","The invoice has been created." "We can't send the invoice email right now.","We can't send the invoice email right now."