Skip to content

Commit f43e187

Browse files
committed
MAGETWO-37819: Sales Tax Report doesn't work
1 parent 2b81885 commit f43e187

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

app/code/Magento/Sales/Model/Resource/Report/Order/Collection.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,15 @@ protected function _getSelectedColumns()
102102
}
103103

104104
/**
105-
* Add selected data
105+
* Apply custom columns before load
106106
*
107-
* @return $this
107+
* @return void
108108
*/
109-
protected function _initSelect()
109+
protected function _beforeLoad()
110110
{
111111
$this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
112112
if (!$this->isTotals()) {
113113
$this->getSelect()->group($this->_periodFormat);
114114
}
115-
return parent::_initSelect();
116115
}
117116
}

app/code/Magento/Sales/Model/Resource/Report/Refunded/Collection/Order.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,15 @@ protected function _getSelectedColumns()
8383
}
8484

8585
/**
86-
* Add selected data
86+
* Apply custom columns before load
8787
*
88-
* @return \Magento\Sales\Model\Resource\Report\Refunded\Collection\Order
88+
* @return void
8989
*/
90-
protected function _initSelect()
90+
protected function _beforeLoad()
9191
{
9292
$this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
9393
if (!$this->isTotals()) {
9494
$this->getSelect()->group($this->_periodFormat);
9595
}
96-
return parent::_initSelect();
9796
}
9897
}

app/code/Magento/Sales/Model/Resource/Report/Shipping/Collection/Order.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ protected function _getSelectedColumns()
8787
}
8888

8989
/**
90-
* Add selected data
90+
* Apply custom columns before load
9191
*
92-
* @return $this
92+
* @return void
9393
*/
94-
protected function _initSelect()
94+
protected function _beforeLoad()
9595
{
9696
$this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
9797

@@ -101,6 +101,5 @@ protected function _initSelect()
101101
if ($this->isSubTotals()) {
102102
$this->getSelect()->group([$this->_periodFormat]);
103103
}
104-
return parent::_initSelect();
105104
}
106105
}

app/code/Magento/Tax/Model/Resource/Report/Collection.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ protected function _getSelectedColumns()
8585
}
8686

8787
/**
88-
* Add selected data
88+
* Apply custom columns before load
8989
*
90-
* @return $this
90+
* @return void
9191
*/
92-
protected function _initSelect()
92+
protected function _beforeLoad()
9393
{
9494
$this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
9595
if (!$this->isTotals() && !$this->isSubTotals()) {
@@ -99,6 +99,5 @@ protected function _initSelect()
9999
if ($this->isSubTotals()) {
100100
$this->getSelect()->group([$this->_periodFormat]);
101101
}
102-
return parent::_initSelect();
103102
}
104103
}

0 commit comments

Comments
 (0)