Line 46 of commerce_reports.blocks.inc:
<?php
$result = db_query('SELECT SUM(amount) AS sum, AVG(amount) AS average, COUNT(*) AS count, currency_code FROM {commerce_payment_transaction} cpt WHERE created >= :start GROUP by currency_code', array(':start' => $start));
?>
But it should be:
<?php
$result = db_query('SELECT SUM(amount) AS sum, AVG(amount) AS average, COUNT(*) AS count, currency_code FROM {commerce_payment_transaction} cpt WHERE created >= :start AND status = :success GROUP by currency_code', array(':start' => $start, ':success' => 'success'));
?>
Patch in comments.
Comments
Comment #1
jessepinho commentedPatch attached.
Comment #2
mglamanThis has been fixed a few commits ago in 4.x as I knew it was an existing issue. I didn't see your issue in the queue before, sorry! Otherwise I'd have provided authorship.