I'm trying to see statistics in trends module but without any result. As you can see in the screenshot attached, there are orders already paid but the graphic is still without any information
I hope you can help me. Thank you
PrestaShop version: 1.7.5.0
PHP version: 7.0.33

HI @rafaviana,
During this period "2018-12-03 2020-01-16" did you generated any new invoices?
In my case with PS 1.7.5.0, I did not manage to reproduce the issue.

Thanks to check & feedback.
Hi @khouloudbelguith ,
thanks for your feedback. I don't use PS to generate invoices, is it necessary?
@rafaviana, for this module dashtrends, it is necessary to regenerate invoices so the statistics will be displayed.
Thanks!
@khouloudbelguith I tried to regenerate invoices from the last year and it says it's not possible…

@rafaviana, that's why you don't have statistics.
Thanks!
@khouloudbelguith is it possible to regenerate invoices?
@rafaviana, you need to navigate to your BO => Orders => Order details => in the "DOCUMENTS" Tab, you can click to "Generate invoice" button => so the invoice will be generated.

Thanks!
@khouloudbelguith can I do it automatically for multiple orders? Without emailing the customer…
Thanks
@rafaviana, here's a quick solution to generate invoices for all orders.
You need to:



wow nice trick @khouloudbelguith !
the only counterpart is that all orders will stay with the status "generate invoice" and it's not what I want honestly… I think I will forget the idea to regenerate invoices
@rafaviana, thanks for your feedback.
So can I close the issue?
Thanks!
Yes @khouloudbelguith . Thanks for the help!
@rafaviana I know this answer is a little late, but a quick way to solve this (in version 1.7.5.0) would be to edit \controllers\admin\AdminStatsController.php file and replace all instances of 'invoice_date' with 'delivery_date' and now you will see the statistics based on delivery date. Alternatively, you could also try replacing with 'date_add' or 'date_upd'.
Try it first on a test site and remember that if you update Prestashop the problem will return again.
@khouloudbelguith I played around with 1.7.5.2 version and added an option in Order Settings -> General that allows you to choose based on which date to display statistics. I think this would be useful for shops that never generate invoices and maybe don't even deliver (virtual products). What do you think? If you think this would be useful I can open a pull request.

@hacchus thank you for your help! I tried with both suggestions but it doesn't work… I still do not understand it 😅
Hi @hacchus,
Thanks a lot for your feedback.
Yes, this is could be useful.
Thanks!
@rafaviana I tested on 1.7.5.0 fresh installation and if you replace invoice_date with delivery_date it works. I don't know why it's not working for you.
@khouloudbelguith OK I created the pull request.
@hacchus, thanks!
@hacchus can you show me your store preferences? Maybe I have something in my preferences creating a conflict
After update to 1.7.6.1 i still have this issue.
Trying all methods from this thread but nothing change
Hi @simon12q,
This issue is currently closed, can you open a new one with more information about your configuration.
Thanks!