File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ public function execute()
114
114
$ this ->_objectManager ->get ('Magento\Backend\Model\Session ' )->setCommentText ($ data ['comment_text ' ]);
115
115
}
116
116
117
+ /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
118
+ $ resultRedirect = $ this ->resultRedirectFactory ->create ();
117
119
try {
118
120
$ invoiceData = $ this ->getRequest ()->getParam ('invoice ' , []);
119
121
$ invoiceItems = isset ($ invoiceData ['items ' ]) ? $ invoiceData ['items ' ] : [];
@@ -210,15 +212,13 @@ public function execute()
210
212
}
211
213
}
212
214
$ this ->_objectManager ->get ('Magento\Backend\Model\Session ' )->getCommentText (true );
215
+ return $ resultRedirect ->setPath ('sales/order/view ' , ['order_id ' => $ orderId ]);
213
216
} catch (Exception $ e ) {
214
217
$ this ->messageManager ->addError ($ e ->getMessage ());
215
218
} catch (\Exception $ e ) {
216
219
$ this ->messageManager ->addError (__ ('We can \'t save the invoice. ' ));
217
220
$ this ->_objectManager ->get ('Psr\Log\LoggerInterface ' )->critical ($ e );
218
221
}
219
- /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
220
- $ resultRedirect = $ this ->resultRedirectFactory ->create ();
221
- $ resultRedirect ->setPath ('sales/*/new ' , ['order_id ' => $ orderId ]);
222
- return $ resultRedirect ;
222
+ return $ resultRedirect ->setPath ('sales/*/new ' , ['order_id ' => $ orderId ]);
223
223
}
224
224
}
You can’t perform that action at this time.
0 commit comments