File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
code/core/Mage/Adminhtml/controllers/Sales/Order Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ protected function _initCreditmemo($update = false)
101
101
$ orderId = $ this ->getRequest ()->getParam ('order_id ' );
102
102
if ($ creditmemoId ) {
103
103
$ creditmemo = Mage::getModel ('sales/order_creditmemo ' )->load ($ creditmemoId );
104
+ if (!$ creditmemo ->getId ()) {
105
+ $ this ->_getSession ()->addError ($ this ->__ ('The credit memo no longer exists. ' ));
106
+ return false ;
107
+ }
104
108
} elseif ($ orderId ) {
105
109
$ data = $ this ->getRequest ()->getParam ('creditmemo ' );
106
110
$ order = Mage::getModel ('sales/order ' )->load ($ orderId );
@@ -193,7 +197,7 @@ public function viewAction()
193
197
$ this ->_setActiveMenu ('sales/order ' )
194
198
->renderLayout ();
195
199
} else {
196
- $ this ->_forward ( ' noRoute ' );
200
+ $ this ->_redirect ( ' */* ' );
197
201
}
198
202
}
199
203
Original file line number Diff line number Diff line change 205
205
"Cannot add tracking number.","Cannot add tracking number."
206
206
"Cannot create an invoice without products.","Cannot create an invoice without products."
207
207
"Cannot create credit memo for the order.","Cannot create credit memo for the order."
208
+ "The credit memo no longer exists.","The credit memo no longer exists."
208
209
"Cannot delete the design change.","Cannot delete the design change."
209
210
"Cannot delete tracking number.","Cannot delete tracking number."
210
211
"Cannot do shipment for the order separately from invoice.","Cannot do shipment for the order separately from invoice."
You can’t perform that action at this time.
0 commit comments