File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Sales \Model \Order \Email \Sender \CreditmemoSender ;
13
13
use Magento \Catalog \Model \Product \Type \AbstractType ;
14
14
use Magento \Sales \Model \Order \Creditmemo \Item ;
15
+ use Magento \Catalog \Model \Product \Type ;
15
16
16
17
/**
17
18
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -181,19 +182,19 @@ private function adjustCreditMemoItemQuantities(Creditmemo $creditMemo): void
181
182
}
182
183
183
184
/**
184
- * Check if quantity accumulation should be skipped for bundle products with fixed pricing
185
+ * Check if the quantity adjustment should be skipped
185
186
*
186
187
* @param Item $item
187
188
* @return bool
188
189
*/
189
190
private function shouldSkipQuantityAccumulation (Item $ item ): bool
190
191
{
191
192
$ parentOrderItem = $ item ->getOrderItem ()->getParentItem ();
192
- if (!$ parentOrderItem || $ parentOrderItem ->getProductType () !== ' bundle ' ) {
193
+ if (!$ parentOrderItem || $ parentOrderItem ->getProductType () !== Type:: TYPE_BUNDLE ) {
193
194
return false ;
194
195
}
195
196
$ parentOptions = $ parentOrderItem ->getProductOptions ();
196
197
return isset ($ parentOptions ['product_calculations ' ]) &&
197
- $ parentOptions ['product_calculations ' ] == AbstractType::CALCULATE_PARENT ;
198
+ $ parentOptions ['product_calculations ' ] === AbstractType::CALCULATE_PARENT ;
198
199
}
199
200
}
You can’t perform that action at this time.
0 commit comments