Skip to content

Commit

Permalink
Merge pull request #16 from amol2jcommerce/2.2-develop-PR-port-19372
Browse files Browse the repository at this point in the history
[Backport] fixed Negative order amount in dashboard - magento#18754
  • Loading branch information
Amol Chaudhari authored Jan 27, 2019
2 parents 23ea6f4 + 5eba9a4 commit 9b9f31c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Reports\Model\ResourceModel\Order;

use Magento\Framework\DB\Select;
Expand Down Expand Up @@ -81,7 +80,7 @@ class Collection extends \Magento\Sales\Model\ResourceModel\Order\Collection
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Sales\Model\Order\Config $orderConfig
* @param \Magento\Sales\Model\ResourceModel\Report\OrderFactory $reportOrderFactory
* @param null $connection
* @param \Magento\Framework\DB\Adapter\AdapterInterface $connection
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
Expand Down Expand Up @@ -825,7 +824,7 @@ protected function getTotalsExpression(
) {
$template = ($storeId != 0)
? '(main_table.base_subtotal - %2$s - %1$s - ABS(main_table.base_discount_amount) - %3$s)'
: '((main_table.base_subtotal - %1$s - %2$s - ABS(main_table.base_discount_amount) - %3$s) '
: '((main_table.base_subtotal - %1$s - %2$s - ABS(main_table.base_discount_amount) + %3$s) '
. ' * main_table.base_to_global_rate)';
return sprintf($template, $baseSubtotalRefunded, $baseSubtotalCanceled, $baseDiscountCanceled);
}
Expand Down

0 comments on commit 9b9f31c

Please sign in to comment.