Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
use Magento\Framework\DB\Select;

/**
* Data collection.
*
* @SuppressWarnings(PHPMD.DepthOfInheritance)
* @api
* @since 100.0.2
*/
class Collection extends \Magento\Reports\Model\ResourceModel\Order\Collection
{
/**
* Set Date range to collection
* Set Date range to collection.
*
* @param int $from
* @param int $to
Expand Down Expand Up @@ -79,6 +81,10 @@ public function addOrderedQty($from = '', $to = '')
)->having(
'order_items.qty_ordered > ?',
0
)->columns(
'SUM(order_items.qty_ordered) as ordered_qty'
)->group(
'order_items.product_id'
);
return $this;
}
Expand Down Expand Up @@ -116,6 +122,8 @@ public function setOrder($attribute, $dir = self::SORT_ORDER_DESC)
}

/**
* @inheritdoc
*
* @return Select
* @since 100.2.0
*/
Expand Down