File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
app/code/Magento/Reports/Model/ResourceModel/Product/Sold Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1414use Magento \Framework \DB \Select ;
1515
1616/**
17+ * Data collection.
18+ *
1719 * @SuppressWarnings(PHPMD.DepthOfInheritance)
1820 * @api
1921 * @since 100.0.2
2022 */
2123class Collection extends \Magento \Reports \Model \ResourceModel \Order \Collection
2224{
2325 /**
24- * Set Date range to collection
26+ * Set Date range to collection.
2527 *
2628 * @param int $from
2729 * @param int $to
@@ -79,6 +81,10 @@ public function addOrderedQty($from = '', $to = '')
7981 )->having (
8082 'order_items.qty_ordered > ? ' ,
8183 0
84+ )->columns (
85+ 'SUM(order_items.qty_ordered) as ordered_qty '
86+ )->group (
87+ 'order_items.product_id '
8288 );
8389 return $ this ;
8490 }
@@ -116,6 +122,8 @@ public function setOrder($attribute, $dir = self::SORT_ORDER_DESC)
116122 }
117123
118124 /**
125+ * @inheritdoc
126+ *
119127 * @return Select
120128 * @since 100.2.0
121129 */
You can’t perform that action at this time.
0 commit comments