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()
123
123
public function getTotalAmount ($ item )
124
124
{
125
125
$ 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
+ }
133
131
return $ totalAmount ;
134
132
}
135
133
@@ -142,13 +140,12 @@ public function getTotalAmount($item)
142
140
public function getBaseTotalAmount ($ item )
143
141
{
144
142
$ 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
+ }
152
149
return $ baseTotalAmount ;
153
150
}
154
151
You can’t perform that action at this time.
0 commit comments