Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOOM-2971] BO Dashboard - Incorrect calculation of Sales and Profit #9983

Closed
prestonBot opened this issue Aug 22, 2018 · 8 comments · Fixed by #13971

Comments

@prestonBot
Copy link
Collaborator

@prestonBot prestonBot commented Aug 22, 2018

This issue has been migrated from the Forge. Read the original ticket here.

  • Reporter: vm0824
  • Created at: Mon, 1 May 2017 13:51:15 +0200

It would appear that the dashboard is not taking into account the discounts that are applied to orders.

I have a $1114 that was discounted $100 to $1014. However this dashboard and profit show the undiscounted amounts. I only have 1 order (i know, thats another issue altogether).

  • How to reproduce the issue ?

Have a shop with 1 order (this helps illustrate the issue, instead of trying to make the calculations yourself).


Create a $1000 order.


Apply a $100 discount to that order, so now it is $900.


Complete the order (marked as paid, shipped, delivered).


The dashboard will not show $900, it'll show $1000 still.

@prestonBot

This comment has been minimized.

Copy link
Collaborator Author

@prestonBot prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: guillaumeb
  • Created at: Tue, 2 May 2017 12:04:01 +0200

Hi Vincent Minichino,

How did you apply the discount on the order ? Through with interface ?

@prestonBot

This comment has been minimized.

Copy link
Collaborator Author

@prestonBot prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: vm0824
  • Created at: Tue, 2 May 2017 13:45:55 +0200

Hello Guillaume,
I add the discount after the order has been created in the BO. Orders --> select order. In the middle of the products section is a "Add a new discount" button. Please see the new png ive attached.

@prestonBot

This comment has been minimized.

Copy link
Collaborator Author

@prestonBot prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: marion_francois
  • Created at: Tue, 2 May 2017 17:04:50 +0200

Je reproduis le problème sur 1.7.1.1
Les stats du Dashboard n'inclues pas les promotions

@prestonBot

This comment has been minimized.

Copy link
Collaborator Author

@prestonBot prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: marion_francois
  • Created at: Mon, 30 Jul 2018 10:45:13 +0200

Hello Khouloud BELGUITH

Can you try to reproduce on the lst version ?

Thanks

@prestonBot

This comment has been minimized.

Copy link
Collaborator Author

@prestonBot prestonBot commented Aug 22, 2018

This comment has been migrated from the Forge. Read the original comment here.

  • Author: khouloud.belguith
  • Created at: Mon, 30 Jul 2018 18:42:51 +0200

Hi Marion F,

Yes, I manage to reproduce the issue with the last version 1.7.4.2.

Best regards, Khouloud

@elmanu13

This comment has been minimized.

Copy link

@elmanu13 elmanu13 commented Jan 7, 2019

Hello,
Reproduced on 1.7.5.0. Any visibility for the correction ? It is not minor at all for me.
Thanks for your job !
capture d ecran 2019-01-07 a 18 59 31
capture d ecran 2019-01-07 a 19 01 19

@khouloudbelguith

This comment has been minimized.

Copy link
Contributor

@khouloudbelguith khouloudbelguith commented Jan 8, 2019

Hi @elmanu13,

The issue is not fixed yet, it added to our bug roadmap.
There are some major issues to solve before this one.
But PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.
Thanks for your understanding!

@ComonSoft

This comment has been minimized.

Copy link
Contributor

@ComonSoft ComonSoft commented May 22, 2019

Sure this is not a minor issue, especially when your business is only online and based under Prestashop ;-)
We will make a pull request asap, but if you want a fix right now you can modify the file /controllers/admin/AdminStatsController.php method getTotalSales() replace all
total_products
by
(total_paid_tax_excl - total_shipping_tax_excl)

And now you will have a real sales tax excluded and shipping cost excluded

@marionf marionf added the 1.7.6.0 label May 24, 2019
ComonSoft added a commit to ComonSoft/PrestaShop that referenced this issue May 24, 2019
Fixed PrestaShop#9983 sales must be taxes and shipping costs excluded
@sarahdib sarahdib added Fixed and removed To Do labels Jun 10, 2019
@sarahdib sarahdib added this to Backlog in PrestaShop 1.7.7 via automation Jun 10, 2019
@sarahdib sarahdib added this to the 1.7.7.0 milestone Jun 10, 2019
@sarahdib sarahdib moved this from Backlog to To be merged in PrestaShop 1.7.7 Jun 10, 2019
PrestaShop 1.7.7 automation moved this from To be merged to Done Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
6 participants
You can’t perform that action at this time.