File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
app/code/Magento/Sales/Block/Adminhtml/Items/Column Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -123,13 +123,11 @@ public function getSku()
123123 public function getTotalAmount ($ item )
124124 {
125125 $ storeId = $ item ->getStoreId ();
126- $ total = $ this ->displaySalesPricesInclTax ($ storeId ) ? $ item ->getPriceInclTax ()
127- : $ item ->getPrice ();
128-
129- $ totalAmount = $ this ->displaySalesPricesInclTax ($ storeId )
130- ? $ total - $ item ->getDiscountAmount () - $ item ->getTaxAmount ()
131- : $ total - $ item ->getDiscountAmount ();
132-
126+ if ($ this ->displaySalesPricesInclTax ($ storeId )) {
127+ $ totalAmount = $ item ->getRowTotalInclTax () - $ item ->getDiscountAmount () - $ item ->getTaxAmount ();
128+ } else {
129+ $ totalAmount = $ item ->getRowTotal () - $ item ->getDiscountAmount ();
130+ }
133131 return $ totalAmount ;
134132 }
135133
@@ -142,13 +140,12 @@ public function getTotalAmount($item)
142140 public function getBaseTotalAmount ($ item )
143141 {
144142 $ storeId = $ item ->getStoreId ();
145- $ baseTotal = $ this ->displaySalesPricesInclTax ($ storeId ) ? $ item ->getBasePriceInclTax ()
146- : $ item ->getBasePrice ();
147-
148- $ baseTotalAmount = $ this ->displaySalesPricesInclTax ($ storeId )
149- ? $ baseTotal - $ item ->getBaseDiscountAmount () - $ item ->getBaseTaxAmount ()
150- : $ baseTotal - $ item ->getBaseDiscountAmount ();
151-
143+ if ($ this ->displaySalesPricesInclTax ($ storeId )) {
144+ $ baseTotalAmount = $ item ->getBaseRowTotalInclTax ()
145+ - $ item ->getBaseDiscountAmount () - $ item ->getBaseTaxAmount ();
146+ } else {
147+ $ baseTotalAmount = $ item ->getBaseRowTotal () - $ item ->getBaseDiscountAmount ();
148+ }
152149 return $ baseTotalAmount ;
153150 }
154151
You can’t perform that action at this time.
0 commit comments