getData('customer_discount_percent')*1.0; $price = $item->getPrice(); // $price = $discountPercent? $price*((100-$discountPercent)/100):$price; return number_format($price, 2); } public function getRowTotal(\Magento\Sales\Model\Order\Item $item): string { $discountPercent = $item->getData('customer_discount_percent')*1.0; $rowTotal = $item->getRowTotal(); $rowTotal = $discountPercent? $rowTotal*((100-$discountPercent)/100):$rowTotal; return number_format($rowTotal, 2); } }