Skip to content

Commit

Permalink
Merge branch '2.3-develop' into 2.3-develop-pr9
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii-balko committed Sep 28, 2018
2 parents 4703b4b + 6e05396 commit 8fe71d7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/code/Magento/Sales/Model/Service/CreditmemoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public function refund(
$creditmemo->getOrder(),
!$offlineRequested
);
$this->getOrderRepository()->save($order);
$this->creditmemoRepository->save($creditmemo);
$this->getOrderRepository()->save($order);
$connection->commit();
} catch (\Exception $e) {
$connection->rollBack();
Expand All @@ -178,6 +178,8 @@ public function refund(
}

/**
* Validates if credit memo is available for refund.
*
* @param \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
Expand Down Expand Up @@ -208,8 +210,9 @@ protected function validateForRefund(\Magento\Sales\Api\Data\CreditmemoInterface
}

/**
* @return \Magento\Sales\Model\Order\RefundAdapterInterface
* Gets the instance of RefundAdapterInterface
*
* @return \Magento\Sales\Model\Order\RefundAdapterInterface
* @deprecated 100.1.3
*/
private function getRefundAdapter()
Expand All @@ -222,8 +225,9 @@ private function getRefundAdapter()
}

/**
* @return \Magento\Framework\App\ResourceConnection|mixed
* Gets instance of ResourceConnection.
*
* @return \Magento\Framework\App\ResourceConnection|mixed
* @deprecated 100.1.3
*/
private function getResource()
Expand All @@ -236,8 +240,9 @@ private function getResource()
}

/**
* @return \Magento\Sales\Api\OrderRepositoryInterface
* Gets instance of OrderRepositoryInterface.
*
* @return \Magento\Sales\Api\OrderRepositoryInterface
* @deprecated 100.1.3
*/
private function getOrderRepository()
Expand All @@ -250,8 +255,9 @@ private function getOrderRepository()
}

/**
* @return \Magento\Sales\Api\InvoiceRepositoryInterface
* Gets instance of InvoiceRepositoryInterface
*
* @return \Magento\Sales\Api\InvoiceRepositoryInterface
* @deprecated 100.1.3
*/
private function getInvoiceRepository()
Expand Down

0 comments on commit 8fe71d7

Please sign in to comment.