Customers orders report wrong information #3101

Closed
MKuzma opened this Issue Jun 10, 2015 · 2 comments

Projects

None yet

3 participants

@MKuzma
MKuzma commented Jun 10, 2015

There is a bug showing in customers orders report wrong number of orders and total amount. The SQL query is wrong and multiplies the number of orders and total amount by the previous result from a LEFT JOIN ... op ON (o.order_id = op.order_id) clause. See attached images where a registered customer and an unregistered customer have each one order. The registered customers order has 3 products and unregistered 2 products. In customers orders report for registered customers I see 3 times multiplied total and the number of orders. Correct should be one order and total $505.

ocbug2
ocbug1

@mrnfrancesco mrnfrancesco added a commit to mrnfrancesco/opencart that referenced this issue Jun 12, 2015
@mrnfrancesco mrnfrancesco Wrapped sql query to avoid sum 'total' and 'orders' multiple times (s…
…ee issue #3101)
834bb75
@mrnfrancesco
Contributor

Issue fixed with pull request #3105. Waiting for merge.

@danielkerr danielkerr closed this Jun 14, 2015
@danielkerr
Contributor

the fix you have added is completely wrong! all you have done is block the system from being able to show another order total of the same amount!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment