Skip to content

Commit d3bd895

Browse files
committed
issues/36800 - Can't create credit memo with free shipping
1 parent d2bacc2 commit d3bd895

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/Sales/Model/Order/Creditmemo/Total

1 file changed

+2
-2
lines changed

app/code/Magento/Sales/Model/Order/Creditmemo/Total/Tax.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public function collect(Creditmemo $creditmemo)
134134
$baseShippingDiscountTaxCompensationAmount = 0;
135135
$shippingDelta = $baseOrderShippingAmount - $baseOrderShippingRefundedAmount;
136136

137-
if ($shippingDelta > $creditmemo->getBaseShippingAmount() ||
138-
$this->isShippingIncludeTaxWithTaxAfterDiscount($order->getStoreId())) {
137+
if ($orderShippingAmount > 0 && ($shippingDelta > $creditmemo->getBaseShippingAmount() ||
138+
$this->isShippingIncludeTaxWithTaxAfterDiscount($order->getStoreId()))) {
139139
$part = $creditmemo->getShippingAmount() / $orderShippingAmount;
140140
$basePart = $creditmemo->getBaseShippingAmount() / $baseOrderShippingAmount;
141141
$shippingTaxAmount = $order->getShippingTaxAmount() * $part;

0 commit comments

Comments
 (0)