Skip to content

Commit 8a6c3f2

Browse files
author
Anton Evers
authored
Loose integer check for creditmemo state
`$creditmemo->getState() = "1"` `Creditmemo::STATE_OPEN = 1`
1 parent 9380c95 commit 8a6c3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function refund(
195195
*/
196196
protected function validateForRefund(\Magento\Sales\Api\Data\CreditmemoInterface $creditmemo)
197197
{
198-
if ($creditmemo->getId() && $creditmemo->getState() !== \Magento\Sales\Model\Order\Creditmemo::STATE_OPEN) {
198+
if ($creditmemo->getId() && $creditmemo->getState() != \Magento\Sales\Model\Order\Creditmemo::STATE_OPEN) {
199199
throw new \Magento\Framework\Exception\LocalizedException(
200200
__('We cannot register an existing credit memo.')
201201
);

0 commit comments

Comments
 (0)