Skip to content

Commit fa20fbe

Browse files
committed
ACP2E-1313: Refund shipping issue with discounted order (Apply Discount On Prices = Including tax)
1 parent 525555e commit fa20fbe

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,10 @@ public function testCollectRefundShippingAmountIncTax()
509509
/**
510510
* situation: The admin user specified the desired refund amount that has taxes and discount embedded within it
511511
*
512+
* @dataProvider calculationSequenceDataProvider
512513
* @throws LocalizedException
513514
*/
514-
public function testCollectUsingShippingInclTaxAndDiscountOnExclBeforeTax()
515+
public function testCollectUsingShippingInclTaxAndDiscountBeforeTax(string $calculationSequence)
515516
{
516517
$this->taxConfig->expects($this->any())->method('displaySalesShippingInclTax')->willReturn(true);
517518
$this->taxConfig->expects($this->any())
@@ -603,4 +604,15 @@ public function testCollectUsingShippingInclTaxAndDiscountOnExclBeforeTax()
603604
->willReturnSelf();
604605
$this->shippingCollector->collect($this->creditmemoMock);
605606
}
607+
608+
/**
609+
* @return array
610+
*/
611+
public function calculationSequenceDataProvider(): array
612+
{
613+
return [
614+
'inclTax' => [TaxCalculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL],
615+
'exclTax' => [TaxCalculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL],
616+
];
617+
}
606618
}

0 commit comments

Comments
 (0)