File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/code/Magento/SalesRule/Model Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ public function deltaRoundingFix(
191
191
192
192
//TODO Seems \Magento\Quote\Model\Quote\Item\AbstractItem::getDiscountPercent() returns float value
193
193
//that can not be used as array index
194
- $ percentKey = (int )$ item ->getDiscountPercent ();
194
+ $ percentKey = (string )$ item ->getDiscountPercent ();
195
195
$ rowTotal = $ item ->getRowTotal ();
196
196
if ($ percentKey && $ rowTotal > 0 ) {
197
197
$ delta = isset ($ this ->_roundingDeltas [$ percentKey ]) ? $ this ->_roundingDeltas [$ percentKey ] : 0 ;
@@ -209,7 +209,7 @@ public function deltaRoundingFix(
209
209
* When we have 100% discount check if totals will not be negative
210
210
*/
211
211
212
- if ($ percentKey == 100 ) {
212
+ if ($ item -> getDiscountPercent () == 100 ) {
213
213
$ discountDelta = $ rowTotalInclTax - $ discountAmount ;
214
214
$ baseDiscountDelta = $ baseRowTotalInclTax - $ baseDiscountAmount ;
215
215
You can’t perform that action at this time.
0 commit comments