Prestashop: Dashboard issue

Created on 29 Aug 2019  路  17Comments  路  Source: PrestaShop/PrestaShop

Hi
my customer said me that the statistics on the start page of dashboard report sells only of the order with invoices. but the invoice is a document for finance, if you do not have to declare making the invoices or the client does not require an invoice you do not have to generate an invoice. I believe it depends on the states of order, they are activated only with a certain condition. But if you know how many orders you have made, the actual profit and sales, I think it is a major flaw when it comes to seeing sales and products sold.

I can give you the access of this site if you need it

thanks

Screenshots
2

3

Additional information
PrestaShop version: 1.7.6.1
PHP version: 7.0

BO Bug Dashboard Dashtrends PR available TBS waiting for PM

All 17 comments

HI
I have discussed this problem with my Maofree programmer, I have seen that we cannot see the reality of the sales made as well as the orders that have been made or the profit margin of our sales because all the orders that have not generated an invoice do not count them and I think that should not be so since it is not always necessary to generate an invoice since that corresponds to the taxation of each country. But if we must have the most accurate information on how many sales we have made and orders or the profit margin that our online store is giving us since it is a critical point to know that we are doing a good job or on the contrary we are carrying a bad strategy of sales, if we are selling with the commercial margin that we earn money or on the contrary if we are losing money because we are selling cheaper. I think it is a very important factor for all online store administrators to have exact control of all orders, products sold and the profit margins that we are having
A greeting and thanks in advance

Hi @maofree, @Vicdetailer,

About the dashtrends module (Dashboard widget), it is necessary to regenerate invoices so the statistics will be displayed, if you don't regenerate an invoice for an order, it will not be taken in consideration for the statistics.
here's a quick solution to generate invoices for all orders.
You need to:

  1. Navigate to BO => Shop Parameters => Order Settings => Status Tab
  2. Create a new order status( for example "generate invoice")
  3. In this order status created
    3.1 Check "Allow a customer to download and view PDF versions of his/her invoices."
    3.2 Check "Hide this status in all customer orders."
    3.3 Save
    image
  1. In the BO => Orders => Select all orders => Change Order Status with Bulk actions =>
    image
    image

So, all invoices will be generated for all orders without notifying the customer.
You can make a test before applying this solution.
Thanks!

hi
the problem is that if you create invoices then you have to register them

@maofree, it is the generating of an invoice for your order. isn't?
Thanks!

not for all orders it is necessary to generate an invoice, only if requested, in the other cases Victor will do a receipt to add in the pack before to send it. In this cases he doesn't use order status with that option active

@maofree, thanks for this clarifications.
Ping @marionf, @colinegin what do you think?
Is it possible to have the dashtrends module with statistics independent of the generation of invoices?
It could be a good improvement for this module.
Thanks!

Hi @khouloudbelguith
Exactly what @maofree says, the dastrends would have to give exact information of the sales made independently if invoices are generated or not, since the invoices in a document for finance but does not affect when giving the real sales data, Orders or profit margin.
We look forward

Greetings

@maofree @Vicdetailer Hi, a month ago I made this pull request #14215 that I think it might help you solve your problem.

Hi @khouloudbelguith

About the dashtrends module (Dashboard widget), it is necessary to regenerate invoices so the statistics will be displayed, if you don't regenerate an invoice for an order, it will not be taken in consideration for the statistics.
here's a quick solution to generate invoices for all orders.

Are you sure about the temp solution you provided above? I am asking this because the staus "Payment received" already has "Allow a customer to download and view PDF versions of his/her invoices." checked and still the dashboard data is incorrect.

So I am thinking that regenerating the invoice won't help.

I am using v1.7.5.1 BTW.

Thank you.

@hitinder For each order created, there are different order statuses enables you to easily manage your orders and returns, and keep your customers informed of the evolution of their purchase.
The variously available statuses are visible and editable in the "Statuses" page, under the "Order settings" menu.
In the Statuses page, there are different options:

  1. Consider the associated order as validated. If enabled, this status marks all associated orders as "paid", and puts them in this same status.
  2. Allow a customer to download and view PDF versions of their invoice. If disabled, you will have to send customers their invoice yourself.
  3. Hide this state in all customer orders. This enables you to create internal statuses, for you and your team. Customers will never see this in their order status page.
  4. Send an e-mail to customer when his/her order status has changed. When enabled, a drop-down menu appears to let you choose which mail template to use.
  5. Attach invoice PDF to email. Send an email to the customer with the invoice in PDF format attached.
  6. Attach delivery slip PDF to email. Send an email to the customer with the delivery slip in PDF format attached.
  7. Set the order as shipped. Be careful: once an order is set as "shipped", it cannot be set back to the previous status.
  8. Set the order as paid. Same here: once an order is set as "paid", it cannot be set back to the previous status.
  9. Show delivery PDF. Displays the delivery PDF.

In conclusion, to enable the generations of invoices, in the order status you should have this option "Allow a customer to download and view PDF versions of his/her invoices." checked.
In the dashboard, to get exact stats, we must have two options selected:

  1. Consider the associated order as validated.
  2. Allow a customer to download and view PDF versions of his/her invoices.
    image
    About my first solution, we just regenerate invoices to valid orders.

Thanks!

@khouloudbelguith I understand how the order status works. What I am trying to tell you is that invoice generation is not working or it doesn't work for the dashtrends in the BO the way you explained below.

About the dashtrends module (Dashboard widget), it is necessary to regenerate invoices so the statistics will be displayed, if you don't regenerate an invoice for an order, it will not be taken in consideration for the statistics.

Check this below screenshot from my BO. You can see below that I have both the below options checked. However, in the BO it is still showing the wrong data for me. It doesn't consider discount values.

Consider the associated order as validated.
Allow a customer to download and view PDF versions of his/her invoices.

image

@hitinder, in the BO => Orders => Invoices page The option "Enable invoices" is enabled?
image

Thanks!

@khouloudbelguith yes it is enabled in the BO for me.

image

@hitinder, it is ok in my case with PS1.7.6.2
https://drive.google.com/file/d/1yVfF4DGAe-LxgRHi-ISRBen3k2Jy0jLX/view
Thanks to check & feedback.

@khouloudbelguith I am not saying that dashtrends is not working. What is wrong with it is that it's not considering the discount amount.

Example: An item worth $20 and cost $5 in an order with 50% discount should show sales amount as $10 and the profit will be $5. Which is not the case at present.

If you don't mind, please make a new order, apply a 50% discount to it and show how does it come up on the chart.

@hitinder, this is another issue.
It is added to our bug roadmap, you need to follow this issue: https://github.com/PrestaShop/PrestaShop/issues/15114

Thanks!

@khouloudbelguith okay got you! I mixed up the two issues.

Was this page helpful?
0 / 5 - 0 ratings