sales totals in 4.40.4 -- am I missing something?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
I've narrowed my orders list to a single order (by dates, statuses, and vendor) with
Order Total: 80.22
Under it I got:
Summary
Profit $164.40
Shipping $63.72
Tax $12.54
Total $240.66
I'd post a screenshot if forum software allowed me to upload.

What gives?
1 year ago
You can't up load here but you can upload to some other online storage and provide a link
Although I guess you have provide the info in text ?
1 year ago
Yeah, I can do that, only it doesn't always work:

1 year ago
Yes, I think it's a bug.  Try it without the Vendor in the filter criteria to see if you get correct totals.

The grid results are due to SearchOrdersAsync() in OrderService.cs
The totals are due to GetOrderAverageReportLineAsync() in OrderReportService.cs

The queries are similar, but not exactly the same.  In the former, the vendor section has additional
  query = query.Distinct();

(P.S.  The name GetOrderAverageReportLineAsync - "Average"?  It seems like they meant to say "Aggregate", since it does Sum()'s, and is used by PrepareOrderAggregatorModelAsync()  )
1 year ago
Do you have any other orders on July 23rd and July 31st? If yes, it could be related to this issue?

Also please try to without the Vendor filter as suggested by "New York" above. Does it help?

Is it possible to share details of this order (without any sensitive data)? The following data only:
1. Order subtotal
2. Order shipping
3. Order tax
4. Order total
5. Profit
6. A list of products with subtotals
1 year ago
I looked at the timestamps issue before posting: that particular order is from 7am CDT, that should be UTC noon i.e. the same date.

Yes, I do have more orders for that week, I narrowed it down to one for the report. W/o the vendor filter there are 7,  totaling at 596.98 -- and the summary cell matches.

Good catch @New York! (FWIW I just finished rewriting a LINQ expression in our custom plugin as a triple-nested loop: it worked in 4.20 and with all the `async`s and `SelectManyAwait()`s in 4.40 it simply never returns. So I can't say I'm surprised.)

Order subtotal $54.80 excl tax
Order shipping $21.24 excl tax
Order tax $4.18
Order total $80.22
Profit $54.80
Items (no discounts so same "price" and "total"):
SKU: 900011                     $12.95 excl tax
SKU: 9780870203572  $12.95 excl tax  
SKU: 9780870204432  $12.95 excl tax  
SKU: 9780870208614  $15.95 excl tax  

I.e. the order itself looks OK, only the summary in the grid's b0rk3d.
1 year ago
Coming back to this: do you guys want me to make an issue on GitHub? -- I did poke at the queries a little but didn't get it right, so: no patch. :(
1 year ago
Hi, dmaziuk! We're investigating this again. I'll let you know soon.
1 year ago
Unfortunately, I couldn't reproduce it( Can you reproduce the issue on the clean nopCommerce installation connected to your database?
1 year ago
alexey.a wrote:
Unfortunately, I couldn't reproduce it...

Above is mentioned "W/o the vendor filter...- and the summary cell matches."  Did you try with / without Vendor criteria?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.