Skip to content

Commit

Permalink
Bugfix: Refund zero shipping refunds #720
Browse files Browse the repository at this point in the history
  • Loading branch information
michielgerritsen committed Nov 20, 2023
1 parent 296a5a2 commit 9ec3f4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Model/Client/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public function createOrderRefund(Order\Creditmemo $creditmemo, Order $order)
* Check if Shipping Fee needs to be refunded.
* Throws exception if Shipping Amount of credit does not match Shipping Fee of paid orderLine.
*/
$addShippingToRefund = null;
$addShippingToRefund = false;
$shippingCostsLine = $this->orderLines->getShippingFeeItemLineOrder($orderId);
if ($shippingCostsLine->getId() && $shippingCostsLine->getQtyRefunded() == 0) {
if ($creditmemo->getShippingAmount() > 0) {
Expand All @@ -757,7 +757,7 @@ public function createOrderRefund(Order\Creditmemo $creditmemo, Order $order)
}
}

$shouldRefund = $addShippingToRefund || !$creditmemo->getAllItems();
$shouldRefund = $addShippingToRefund || $creditmemo->getAllItems();
if (!$shouldRefund || $this->adjustmentFee->doNotRefundInMollie()) {
return $this;
}
Expand Down

0 comments on commit 9ec3f4b

Please sign in to comment.