The variable used to find the statuses available to be used in reports, 'uc_reports_reported_statuses', by default returns an array consisting of one value which is 'completed'. UC Reports will work fine like this.
Once you make a change to the store settings (https://www.barcodestalk.com/admin/store/settings/store) that variable is defined in the database as an associative array with all the statuses not used in reporting now having an index in that array and a default value of 0. This array doesn't work with the queries built in the uc_reports_get_sales() function.
For anyone else suffering from this issue, you can "fix" it for the time being by deleting that variable from your database after you make any changes to your store settings page.
DELETE FROM variable WHERE name = 'uc_reports_reported_statuses';
Comments
Comment #1
swickham CreditAttribution: swickham commentedUpdate:
Looking at another site I run on the same version Ubercart 7-3.6 it does save the variable in the database the same way, but seems to have no problem with that. I'm not sure what the difference is between the two sites that's causing this behaviour in one but not the other.
Comment #2
TR CreditAttribution: TR commentedCorrect.
What do you mean by "This array doesn't work with the queries built in the uc_reports_get_sales() function."? I don't see any errors on /admin/store/reports/sales after I change the list of reported statuses, and the sales report does accurately reflect the sales for the statuses I selected. What is the specific problem you see and how can I reproduce it?
Comment #3
TR CreditAttribution: TR commentedNo further information provided.