Skip to content

Commit ccc599e

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

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
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
@@ -146,10 +146,10 @@ private function getTaxConfig()
146146
/**
147147
* Get base allowed amount including Tax.
148148
*
149+
* @param float $baseAllowedAmountInclTaxDiff
149150
* @return float
150-
*
151151
*/
152-
private function getBaseAllowedAmountInclTax($baseAllowedAmountInclTaxDiff)
152+
private function getBaseAllowedAmountInclTax(float $baseAllowedAmountInclTaxDiff)
153153
{
154154
return ($baseAllowedAmountInclTaxDiff > 0) ? $baseAllowedAmountInclTaxDiff : 0;
155155
}

app/code/Magento/Sales/Test/Unit/Model/Order/Creditmemo/Total/ShippingTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,10 @@ public function testCollectRefundShippingAmountIncTax()
486486
->method('setBaseGrandTotal')
487487
->with($expectedBaseGrandTotal)
488488
->willReturnSelf();
489-
$this->assertEquals(0, $this->shippingCollector->getBaseAllowedAmountInclTax($expectedBaseShippingAmountInclTax));
489+
$this->assertEquals(
490+
0,
491+
$this->shippingCollector->getBaseAllowedAmountInclTax($expectedBaseShippingAmountInclTax)
492+
);
490493
$this->shippingCollector->collect($this->creditmemoMock);
491494
}
492495
}

0 commit comments

Comments
 (0)