Sales Summary Report - profit calculation and filtering

9 个月 前
wanna report 2 issues on sales summary report

ISSUE 1 - profit calculation
1. nopCommerce version
4.6 with sample data

2. Expected behavior
profit is less than order total

3. Actual behavior
profit is same as order total

4. Steps to reproduce the problem
with new installation with sample data, create a product with product cost.
checkout the new product.
view the sales summary report group by day. The profit and order total are the same when the profit should be lesser than order total.

The problem happens when there are multiple orders in a day, the profit calculation is done by selecting the top 1 order of that day.

ISSUE 2 - Filtering
1. nopCommerce version
4.6 with sample data

2. Expected behavior
report should show 1 order with order total of $102

3. Actual behavior
report shows 3 orders with order total of $306

4. Steps to reproduce the problem
with new installation with sample data, view the sales summary report group by day.
then filter category by selecting "Books" category.

The problem happens when the order table need to join order item table to apply the filter.
In this case, order #4 has 3 items, causing duplicate rows. This behavior messes up all the summing of the report fields.

Off topic: Please consider to allow multiple selection of order status. Right now the report also include cancelled orders.
9 个月 前
Thanks for your investigation and suggestion. Here (6793, 6794, 6795) are the work items for it.