Skip to content

Commit b30f624

Browse files
committed
ACP2E-1074: [Magento Cloud] - discount_percent on tables sales_order_item not populating (B2B)
1 parent 2e45de7 commit b30f624

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/SalesRule/Model/Rule/Action/Discount/ByPercent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function _calculate($rule, $item, $qty, $rulePercent)
6161
($qty * $baseItemOriginalPrice - $item->getBaseDiscountAmount()) * $_rulePct
6262
);
6363

64-
if (!$rule->getDiscountQty() || $rule->getDiscountQty() > $qty) {
64+
if (!$rule->getDiscountQty() || $rule->getDiscountQty() >= $qty) {
6565
$discountPercent = min(100, $item->getDiscountPercent() + $rulePercent);
6666
$item->setDiscountPercent($discountPercent);
6767
}

app/code/Magento/SalesRule/Test/Unit/Model/Rule/Action/Discount/ByPercentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function testCalculate(
173173
)->willReturn(
174174
$itemData['baseDiscountAmount']
175175
);
176-
if (!$ruleData['discountQty'] || $ruleData['discountQty'] > $qty) {
176+
if (!$ruleData['discountQty'] || $ruleData['discountQty'] >= $qty) {
177177
$item->expects(
178178
$this->atLeastOnce()
179179
)->method(

0 commit comments

Comments
 (0)