Skip to content

Commit 5b68693

Browse files
committed
Merge remote-tracking branch 'remotes/origin/MAGETWO-29383' into S60
2 parents 91e190a + f1b5ded commit 5b68693

File tree

1 file changed

+8
-2
lines changed
  • app/code/Magento/Sales/Model/Resource/Report/Invoiced/Collection

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,17 @@ protected function _getSelectedColumns()
9090
*/
9191
protected function _initSelect()
9292
{
93-
$this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
93+
$this->getSelect()->from($this->getResource()->getMainTable());
94+
return parent::_initSelect();
95+
}
96+
97+
protected function _beforeLoad()
98+
{
99+
$this->getSelect()->columns($this->_getSelectedColumns());
94100
if (!$this->isTotals()) {
95101
$this->getSelect()->group($this->_periodFormat);
96102
$this->getSelect()->having('SUM(orders_count) > 0');
97103
}
98-
return parent::_initSelect();
104+
return parent::_beforeLoad();
99105
}
100106
}

0 commit comments

Comments
 (0)