Skip to content

Commit b413eb5

Browse files
committed
AC-2519: admin config state option
1 parent 8629a81 commit b413eb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/SalesRule/Model/Utility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function deltaRoundingFix(
191191

192192
//TODO Seems \Magento\Quote\Model\Quote\Item\AbstractItem::getDiscountPercent() returns float value
193193
//that can not be used as array index
194-
$percentKey = (int)$item->getDiscountPercent();
194+
$percentKey = (string)$item->getDiscountPercent();
195195
$rowTotal = $item->getRowTotal();
196196
if ($percentKey && $rowTotal > 0) {
197197
$delta = isset($this->_roundingDeltas[$percentKey]) ? $this->_roundingDeltas[$percentKey] : 0;
@@ -209,7 +209,7 @@ public function deltaRoundingFix(
209209
* When we have 100% discount check if totals will not be negative
210210
*/
211211

212-
if ($percentKey == 100) {
212+
if ($item->getDiscountPercent() == 100) {
213213
$discountDelta = $rowTotalInclTax - $discountAmount;
214214
$baseDiscountDelta = $baseRowTotalInclTax - $baseDiscountAmount;
215215

0 commit comments

Comments
 (0)