Magento's sales orders report is wrong
We use the Sales orders report to know how many bucks we earn. For this reason we update the statistic every day by a cron job. But the report has wrong values. Nothing it's equal to the values that we get by adding manually or adding by SQL query over the sales_flat_order table (only for status='complete').
The view Sales orders show all orders correctly.
I can't understand why the report supply wrong data. What can I do to fix this problem?
reports sales-order bug
add a comment |
We use the Sales orders report to know how many bucks we earn. For this reason we update the statistic every day by a cron job. But the report has wrong values. Nothing it's equal to the values that we get by adding manually or adding by SQL query over the sales_flat_order table (only for status='complete').
The view Sales orders show all orders correctly.
I can't understand why the report supply wrong data. What can I do to fix this problem?
reports sales-order bug
add a comment |
We use the Sales orders report to know how many bucks we earn. For this reason we update the statistic every day by a cron job. But the report has wrong values. Nothing it's equal to the values that we get by adding manually or adding by SQL query over the sales_flat_order table (only for status='complete').
The view Sales orders show all orders correctly.
I can't understand why the report supply wrong data. What can I do to fix this problem?
reports sales-order bug
We use the Sales orders report to know how many bucks we earn. For this reason we update the statistic every day by a cron job. But the report has wrong values. Nothing it's equal to the values that we get by adding manually or adding by SQL query over the sales_flat_order table (only for status='complete').
The view Sales orders show all orders correctly.
I can't understand why the report supply wrong data. What can I do to fix this problem?
reports sales-order bug
reports sales-order bug
edited Jul 25 '17 at 19:41
Community♦
1
1
asked Jul 4 '14 at 9:10
thinze
41113
41113
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
2 issues may be here,
First the timezone one - There’s been an issue for some time with the date pickers in the admin screens being in inconsistent timezones. Internally everything is saved to the database in Universal Time (essentially GMT) and the user facing elements such as date pickers and report results should be shifted to your locale’s time, however some actions haven’t been caught so you’re actually getting GMT based results in some cases.
The bigger issue for reports though is refreshing the statistics. Try hitting
Report > Refresh Statistics
and refreshing them all manually and see if it’s still wrong. Even though the last updated dates look right for me and all cron jobs appear to be working I find I get these same errors unless I do this.
add a comment |
I have found a link that explain the problem with the daily statisctic refresh.
http://www.neptuneweb.com/blog/31-problems-with-order-reporting-in-magento.html
And now I know whats going wrong. The daily refresh script use wrong/not-logical queries. Orders who are not updated on the creation date will be ignored.
!!! The solution is to use the lifetime statistic refresh instead of the daily statistic refresh. !!!
add a comment |
Steps to reproduce:
- Login to Admin Panel
- Go to Reports->Sales->Orders screen
- Filter orders for some date range which should fall in Daylight savings time.
- Notice the totals which are shown, are not 100% correct.
Expected Result:
The totals in Reports->Sales->Orders screen should match totals in Sales->Orders grid screen when downloading CSV from there. I have attached the issue in detail along with solution in the attached file.
Actual Result:
The totals in Reports->Sales->Orders screen is not coming correct when date range filter falls in daylight savings time.
Magento Version affected:
It seems all CE and EE versions, I only checked CE 1.8, 1.9 and EE 1.13, 1.14
Files Affected:
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
app/code/core/Mage/Reports/Model/Mysql4/Report/Abstract.php (In older magento versions using Mysql4 instead of Resource)
Technical Details:
In the file app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
function: _getTZOffsetTransitions
line 418, $dateTimeObject->set($tr['time']);
add a comment |
I am facing issue for order data(prices) not showing correct in reports grid Reports > Sales > Orders for particular store. all other stores having correct data.
I have selected specific store, data range and click on Show Report button. Order reports grid is showing correct order count but all records having 0 prices.
It is showing correct prices in order grid Sales > Order.
I am having multi website + multi store website.
My all stores are showing correct data(all prices) but all prices for one store is showing price 0 always.
I have checked that order table sales_flat_order is having correct data, but order reports table sales_order_aggregated_created and sales_order_aggregated_updated are having price 0.
Table: sales_flat_order:
Table: sales_order_aggregated_created:
So, as per database, Order is having correct data but reports tables don't have correct data.
I have refreshed lifttime statics every time. it generates new entries but having wrong value for one store.
I have checked Mage_Sales_Model_Resource_Report_Order_Createdat::_aggregateByField method and logged queries, after that I have run that queries to database. It is shoving 0 price for all.
That means There is something wrong when data fetch from order table and add it to reports table.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f25993%2fmagentos-sales-orders-report-is-wrong%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
2 issues may be here,
First the timezone one - There’s been an issue for some time with the date pickers in the admin screens being in inconsistent timezones. Internally everything is saved to the database in Universal Time (essentially GMT) and the user facing elements such as date pickers and report results should be shifted to your locale’s time, however some actions haven’t been caught so you’re actually getting GMT based results in some cases.
The bigger issue for reports though is refreshing the statistics. Try hitting
Report > Refresh Statistics
and refreshing them all manually and see if it’s still wrong. Even though the last updated dates look right for me and all cron jobs appear to be working I find I get these same errors unless I do this.
add a comment |
2 issues may be here,
First the timezone one - There’s been an issue for some time with the date pickers in the admin screens being in inconsistent timezones. Internally everything is saved to the database in Universal Time (essentially GMT) and the user facing elements such as date pickers and report results should be shifted to your locale’s time, however some actions haven’t been caught so you’re actually getting GMT based results in some cases.
The bigger issue for reports though is refreshing the statistics. Try hitting
Report > Refresh Statistics
and refreshing them all manually and see if it’s still wrong. Even though the last updated dates look right for me and all cron jobs appear to be working I find I get these same errors unless I do this.
add a comment |
2 issues may be here,
First the timezone one - There’s been an issue for some time with the date pickers in the admin screens being in inconsistent timezones. Internally everything is saved to the database in Universal Time (essentially GMT) and the user facing elements such as date pickers and report results should be shifted to your locale’s time, however some actions haven’t been caught so you’re actually getting GMT based results in some cases.
The bigger issue for reports though is refreshing the statistics. Try hitting
Report > Refresh Statistics
and refreshing them all manually and see if it’s still wrong. Even though the last updated dates look right for me and all cron jobs appear to be working I find I get these same errors unless I do this.
2 issues may be here,
First the timezone one - There’s been an issue for some time with the date pickers in the admin screens being in inconsistent timezones. Internally everything is saved to the database in Universal Time (essentially GMT) and the user facing elements such as date pickers and report results should be shifted to your locale’s time, however some actions haven’t been caught so you’re actually getting GMT based results in some cases.
The bigger issue for reports though is refreshing the statistics. Try hitting
Report > Refresh Statistics
and refreshing them all manually and see if it’s still wrong. Even though the last updated dates look right for me and all cron jobs appear to be working I find I get these same errors unless I do this.
answered Jul 4 '14 at 9:48
TBI Infotech
4,5471830
4,5471830
add a comment |
add a comment |
I have found a link that explain the problem with the daily statisctic refresh.
http://www.neptuneweb.com/blog/31-problems-with-order-reporting-in-magento.html
And now I know whats going wrong. The daily refresh script use wrong/not-logical queries. Orders who are not updated on the creation date will be ignored.
!!! The solution is to use the lifetime statistic refresh instead of the daily statistic refresh. !!!
add a comment |
I have found a link that explain the problem with the daily statisctic refresh.
http://www.neptuneweb.com/blog/31-problems-with-order-reporting-in-magento.html
And now I know whats going wrong. The daily refresh script use wrong/not-logical queries. Orders who are not updated on the creation date will be ignored.
!!! The solution is to use the lifetime statistic refresh instead of the daily statistic refresh. !!!
add a comment |
I have found a link that explain the problem with the daily statisctic refresh.
http://www.neptuneweb.com/blog/31-problems-with-order-reporting-in-magento.html
And now I know whats going wrong. The daily refresh script use wrong/not-logical queries. Orders who are not updated on the creation date will be ignored.
!!! The solution is to use the lifetime statistic refresh instead of the daily statistic refresh. !!!
I have found a link that explain the problem with the daily statisctic refresh.
http://www.neptuneweb.com/blog/31-problems-with-order-reporting-in-magento.html
And now I know whats going wrong. The daily refresh script use wrong/not-logical queries. Orders who are not updated on the creation date will be ignored.
!!! The solution is to use the lifetime statistic refresh instead of the daily statistic refresh. !!!
answered Jul 7 '14 at 7:39
thinze
41113
41113
add a comment |
add a comment |
Steps to reproduce:
- Login to Admin Panel
- Go to Reports->Sales->Orders screen
- Filter orders for some date range which should fall in Daylight savings time.
- Notice the totals which are shown, are not 100% correct.
Expected Result:
The totals in Reports->Sales->Orders screen should match totals in Sales->Orders grid screen when downloading CSV from there. I have attached the issue in detail along with solution in the attached file.
Actual Result:
The totals in Reports->Sales->Orders screen is not coming correct when date range filter falls in daylight savings time.
Magento Version affected:
It seems all CE and EE versions, I only checked CE 1.8, 1.9 and EE 1.13, 1.14
Files Affected:
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
app/code/core/Mage/Reports/Model/Mysql4/Report/Abstract.php (In older magento versions using Mysql4 instead of Resource)
Technical Details:
In the file app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
function: _getTZOffsetTransitions
line 418, $dateTimeObject->set($tr['time']);
add a comment |
Steps to reproduce:
- Login to Admin Panel
- Go to Reports->Sales->Orders screen
- Filter orders for some date range which should fall in Daylight savings time.
- Notice the totals which are shown, are not 100% correct.
Expected Result:
The totals in Reports->Sales->Orders screen should match totals in Sales->Orders grid screen when downloading CSV from there. I have attached the issue in detail along with solution in the attached file.
Actual Result:
The totals in Reports->Sales->Orders screen is not coming correct when date range filter falls in daylight savings time.
Magento Version affected:
It seems all CE and EE versions, I only checked CE 1.8, 1.9 and EE 1.13, 1.14
Files Affected:
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
app/code/core/Mage/Reports/Model/Mysql4/Report/Abstract.php (In older magento versions using Mysql4 instead of Resource)
Technical Details:
In the file app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
function: _getTZOffsetTransitions
line 418, $dateTimeObject->set($tr['time']);
add a comment |
Steps to reproduce:
- Login to Admin Panel
- Go to Reports->Sales->Orders screen
- Filter orders for some date range which should fall in Daylight savings time.
- Notice the totals which are shown, are not 100% correct.
Expected Result:
The totals in Reports->Sales->Orders screen should match totals in Sales->Orders grid screen when downloading CSV from there. I have attached the issue in detail along with solution in the attached file.
Actual Result:
The totals in Reports->Sales->Orders screen is not coming correct when date range filter falls in daylight savings time.
Magento Version affected:
It seems all CE and EE versions, I only checked CE 1.8, 1.9 and EE 1.13, 1.14
Files Affected:
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
app/code/core/Mage/Reports/Model/Mysql4/Report/Abstract.php (In older magento versions using Mysql4 instead of Resource)
Technical Details:
In the file app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
function: _getTZOffsetTransitions
line 418, $dateTimeObject->set($tr['time']);
Steps to reproduce:
- Login to Admin Panel
- Go to Reports->Sales->Orders screen
- Filter orders for some date range which should fall in Daylight savings time.
- Notice the totals which are shown, are not 100% correct.
Expected Result:
The totals in Reports->Sales->Orders screen should match totals in Sales->Orders grid screen when downloading CSV from there. I have attached the issue in detail along with solution in the attached file.
Actual Result:
The totals in Reports->Sales->Orders screen is not coming correct when date range filter falls in daylight savings time.
Magento Version affected:
It seems all CE and EE versions, I only checked CE 1.8, 1.9 and EE 1.13, 1.14
Files Affected:
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
app/code/core/Mage/Reports/Model/Mysql4/Report/Abstract.php (In older magento versions using Mysql4 instead of Resource)
Technical Details:
In the file app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
function: _getTZOffsetTransitions
line 418, $dateTimeObject->set($tr['time']);
edited Jun 23 '17 at 7:19
Mohit Kumar Arora
6,27841532
6,27841532
answered Jun 23 '17 at 6:40
subash pandey
212
212
add a comment |
add a comment |
I am facing issue for order data(prices) not showing correct in reports grid Reports > Sales > Orders for particular store. all other stores having correct data.
I have selected specific store, data range and click on Show Report button. Order reports grid is showing correct order count but all records having 0 prices.
It is showing correct prices in order grid Sales > Order.
I am having multi website + multi store website.
My all stores are showing correct data(all prices) but all prices for one store is showing price 0 always.
I have checked that order table sales_flat_order is having correct data, but order reports table sales_order_aggregated_created and sales_order_aggregated_updated are having price 0.
Table: sales_flat_order:
Table: sales_order_aggregated_created:
So, as per database, Order is having correct data but reports tables don't have correct data.
I have refreshed lifttime statics every time. it generates new entries but having wrong value for one store.
I have checked Mage_Sales_Model_Resource_Report_Order_Createdat::_aggregateByField method and logged queries, after that I have run that queries to database. It is shoving 0 price for all.
That means There is something wrong when data fetch from order table and add it to reports table.
add a comment |
I am facing issue for order data(prices) not showing correct in reports grid Reports > Sales > Orders for particular store. all other stores having correct data.
I have selected specific store, data range and click on Show Report button. Order reports grid is showing correct order count but all records having 0 prices.
It is showing correct prices in order grid Sales > Order.
I am having multi website + multi store website.
My all stores are showing correct data(all prices) but all prices for one store is showing price 0 always.
I have checked that order table sales_flat_order is having correct data, but order reports table sales_order_aggregated_created and sales_order_aggregated_updated are having price 0.
Table: sales_flat_order:
Table: sales_order_aggregated_created:
So, as per database, Order is having correct data but reports tables don't have correct data.
I have refreshed lifttime statics every time. it generates new entries but having wrong value for one store.
I have checked Mage_Sales_Model_Resource_Report_Order_Createdat::_aggregateByField method and logged queries, after that I have run that queries to database. It is shoving 0 price for all.
That means There is something wrong when data fetch from order table and add it to reports table.
add a comment |
I am facing issue for order data(prices) not showing correct in reports grid Reports > Sales > Orders for particular store. all other stores having correct data.
I have selected specific store, data range and click on Show Report button. Order reports grid is showing correct order count but all records having 0 prices.
It is showing correct prices in order grid Sales > Order.
I am having multi website + multi store website.
My all stores are showing correct data(all prices) but all prices for one store is showing price 0 always.
I have checked that order table sales_flat_order is having correct data, but order reports table sales_order_aggregated_created and sales_order_aggregated_updated are having price 0.
Table: sales_flat_order:
Table: sales_order_aggregated_created:
So, as per database, Order is having correct data but reports tables don't have correct data.
I have refreshed lifttime statics every time. it generates new entries but having wrong value for one store.
I have checked Mage_Sales_Model_Resource_Report_Order_Createdat::_aggregateByField method and logged queries, after that I have run that queries to database. It is shoving 0 price for all.
That means There is something wrong when data fetch from order table and add it to reports table.
I am facing issue for order data(prices) not showing correct in reports grid Reports > Sales > Orders for particular store. all other stores having correct data.
I have selected specific store, data range and click on Show Report button. Order reports grid is showing correct order count but all records having 0 prices.
It is showing correct prices in order grid Sales > Order.
I am having multi website + multi store website.
My all stores are showing correct data(all prices) but all prices for one store is showing price 0 always.
I have checked that order table sales_flat_order is having correct data, but order reports table sales_order_aggregated_created and sales_order_aggregated_updated are having price 0.
Table: sales_flat_order:
Table: sales_order_aggregated_created:
So, as per database, Order is having correct data but reports tables don't have correct data.
I have refreshed lifttime statics every time. it generates new entries but having wrong value for one store.
I have checked Mage_Sales_Model_Resource_Report_Order_Createdat::_aggregateByField method and logged queries, after that I have run that queries to database. It is shoving 0 price for all.
That means There is something wrong when data fetch from order table and add it to reports table.
edited Sep 19 '18 at 10:49
Teja Bhagavan Kollepara
2,93841847
2,93841847
answered Sep 7 '17 at 4:51
Gopal Kacha
171111
171111
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f25993%2fmagentos-sales-orders-report-is-wrong%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown