Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 6e05396

Browse files
authored
Merge pull request #3212 from magento-mpi/mpi-forwardport-2409
[MPI]-forwardport-94245
2 parents 4b0750c + 009e98d commit 6e05396

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

app/code/Magento/Sales/Model/Service/CreditmemoService.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ public function refund(
166166
$creditmemo->getOrder(),
167167
!$offlineRequested
168168
);
169-
$this->getOrderRepository()->save($order);
170169
$this->creditmemoRepository->save($creditmemo);
170+
$this->getOrderRepository()->save($order);
171171
$connection->commit();
172172
} catch (\Exception $e) {
173173
$connection->rollBack();
@@ -178,6 +178,8 @@ public function refund(
178178
}
179179

180180
/**
181+
* Validates if credit memo is available for refund.
182+
*
181183
* @param \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo
182184
* @return bool
183185
* @throws \Magento\Framework\Exception\LocalizedException
@@ -208,8 +210,9 @@ protected function validateForRefund(\Magento\Sales\Api\Data\CreditmemoInterface
208210
}
209211

210212
/**
211-
* @return \Magento\Sales\Model\Order\RefundAdapterInterface
213+
* Gets the instance of RefundAdapterInterface
212214
*
215+
* @return \Magento\Sales\Model\Order\RefundAdapterInterface
213216
* @deprecated 100.1.3
214217
*/
215218
private function getRefundAdapter()
@@ -222,8 +225,9 @@ private function getRefundAdapter()
222225
}
223226

224227
/**
225-
* @return \Magento\Framework\App\ResourceConnection|mixed
228+
* Gets instance of ResourceConnection.
226229
*
230+
* @return \Magento\Framework\App\ResourceConnection|mixed
227231
* @deprecated 100.1.3
228232
*/
229233
private function getResource()
@@ -236,8 +240,9 @@ private function getResource()
236240
}
237241

238242
/**
239-
* @return \Magento\Sales\Api\OrderRepositoryInterface
243+
* Gets instance of OrderRepositoryInterface.
240244
*
245+
* @return \Magento\Sales\Api\OrderRepositoryInterface
241246
* @deprecated 100.1.3
242247
*/
243248
private function getOrderRepository()
@@ -250,8 +255,9 @@ private function getOrderRepository()
250255
}
251256

252257
/**
253-
* @return \Magento\Sales\Api\InvoiceRepositoryInterface
258+
* Gets instance of InvoiceRepositoryInterface
254259
*
260+
* @return \Magento\Sales\Api\InvoiceRepositoryInterface
255261
* @deprecated 100.1.3
256262
*/
257263
private function getInvoiceRepository()

0 commit comments

Comments
 (0)