# Preparations
# apply the patch from the D547 (if not already applied)
# login to the Admin Console
# go to the {nav Website & Content > Structure & Data > Products} section
# create a `Sub Products` category/section
# switch to a newly created category/section
# create a Type=Service product + Status=Active + Price=15.00 product in it
# if the product price wasn't saved, then try editing that product -> specifying a price -> saving it again
# create a Type=Service product + Status=Active + Price=5.00 product in it
# if the product price wasn't saved, then try editing that product -> specifying a price -> saving it again
# go to the {nav User Management > Users} section
# create a Status=Enabled user
# go to the {nav E-commerce > Orders} section
# switch to the `Incomplete` tab
# create a new incomplete order:
* use the above-created user and products (several with different quantities)
* fill all required fields on all tabs
# on the `Incomplete` tab:
* select the newly created sales order
* press the `Place Order` toolbar button
# in IDE:
* open the `modules/in-commerce/units/reports/reports_event_handler.php` file for editing
* in the `report:OnUpdateConfig` event change `'totals' => 'sum'` into `'totals' => 'avg'` for the `Qty` field declaration
* save changes
# Test Plan
# login to the Admin Console
# go to the {nav E-commerce > Sales Report} section
# run the `By Product` report
# confirm that total below grid in the `Qty` column is an average (not sum) of the 2 shown grid rows
# perform the CSV export by pressing an `Export` button on the toolbar
# confirm that the same average value is shown in the export CSV file as well