diff --git a/vendor/magento/module-sales/Block/Adminhtml/Items/Column/DefaultColumn.php b/vendor/magento/module-sales/Block/Adminhtml/Items/Column/DefaultColumn.php index 9af0c215c238f..e60bb62cf62bb 100644 --- a/vendor/magento/module-sales/Block/Adminhtml/Items/Column/DefaultColumn.php +++ b/vendor/magento/module-sales/Block/Adminhtml/Items/Column/DefaultColumn.php @@ -1,7 +1,7 @@ getStoreId(); - $total = $this->displaySalesPricesInclTax($storeId) ? $item->getPriceInclTax() - : $item->getPrice(); - - $totalAmount = $this->displaySalesPricesInclTax($storeId) - ? $total - $item->getDiscountAmount() - $item->getTaxAmount() - : $total - $item->getDiscountAmount(); - + if ($this->displaySalesPricesInclTax($storeId)) { + $totalAmount = $item->getRowTotalInclTax() - $item->getDiscountAmount() - $item->getTaxAmount(); + } else { + $totalAmount = $item->getRowTotal() - $item->getDiscountAmount(); + } return $totalAmount; } @@ -142,13 +140,12 @@ public function getTotalAmount($item) public function getBaseTotalAmount($item) { $storeId = $item->getStoreId(); - $baseTotal = $this->displaySalesPricesInclTax($storeId) ? $item->getBasePriceInclTax() - : $item->getBasePrice(); - - $baseTotalAmount = $this->displaySalesPricesInclTax($storeId) - ? $baseTotal - $item->getBaseDiscountAmount() - $item->getBaseTaxAmount() - : $baseTotal - $item->getBaseDiscountAmount(); - + if ($this->displaySalesPricesInclTax($storeId)) { + $baseTotalAmount = $item->getBaseRowTotalInclTax() + - $item->getBaseDiscountAmount() - $item->getBaseTaxAmount(); + } else { + $baseTotalAmount = $item->getBaseRowTotal() - $item->getBaseDiscountAmount(); + } return $baseTotalAmount; }