Skip to content

Commit 052329d

Browse files
Chhandak.BaruaChhandak.Barua
authored andcommitted
ACP2E-707 Credit memo 'Refund Shipping (Incl. Tax)' shows -0.01
1 parent ccc599e commit 052329d

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/Shipping.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ public function collect(\Magento\Sales\Model\Order\Creditmemo $creditmemo)
5858
$orderBaseShippingInclTax = $order->getBaseShippingInclTax();
5959
$allowedTaxAmount = $order->getShippingTaxAmount() - $order->getShippingTaxRefunded();
6060
$allowedAmountInclTax = $allowedAmount + $allowedTaxAmount;
61-
$baseAllowedAmountInclTaxDiff = $orderBaseShippingInclTax
61+
$baseAllowedAmountInclTax = $orderBaseShippingInclTax
6262
- $order->getBaseShippingRefunded()
6363
- $order->getBaseShippingTaxRefunded();
64-
$baseAllowedAmountInclTax = $this->getBaseAllowedAmountInclTax($baseAllowedAmountInclTaxDiff);
64+
$baseAllowedAmountInclTax = max($baseAllowedAmountInclTax, 0);
6565
// Check if the desired shipping amount to refund was specified (from invoice or another source).
6666
if ($creditmemo->hasBaseShippingAmount()) {
6767
// For the conditional logic, we will either use amounts that always include tax -OR- never include tax.

0 commit comments

Comments
 (0)