Hi,
this question was asked before but as no replies and was quite some time back:
Can anyone shed any light on it? Basically if I select From and To dates in Sales > Orders it shows all the orders placed in that time frame. This is obviously based on order create date and no other filters are applied other than the From and To dates.
When I try to run Reports > Sales > Orders, same date range, match period to is set to Order Created Date, for all statuses and, period is set to Days and Empty Rows is set to Yes (show empty rows) and Show Actual Values is also set to Yes. The reports shows me every date as a row. However the problem is that there are dates which have orders as seen from Sales > Orders but they do not show on Reports > Sales > Orders
Statistics have been lifetime refreshed.
Any ideas?
Thanks
Bijal
Solved! Go to Solution.
We have come across this solution
Steps to reproduce:
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']);
$dateTimeObject is object of Zend_Date() and expects parameter 2 for the date/time format
http://framework.zend.com/manual/1.11/en/zend.date.basic.html#zend.date.simple.functions.set
After changing this line:
1$dateTimeObject->set($tr['time']);
with
1$dateTimeObject->set($tr['time'], Varien_Date::DATETIME_INTERNAL_FORMAT);
the issue was fixed and the order totals were shown correctly in Reports->Sales->Order screen.
Important Note: After the above change it is required to re-build lifetime statistics of Orders to update database table sales_order_aggregated_created.
Make the change by copying the core file to your local so that future upgrade will not overwrite your fix.
Or
you can also see this link:
http://magento.stackexchange.com/questions/25993/magentos-sales-orders-report-is-wrong
Regards
Manish
We have come across this solution
Steps to reproduce:
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']);
$dateTimeObject is object of Zend_Date() and expects parameter 2 for the date/time format
http://framework.zend.com/manual/1.11/en/zend.date.basic.html#zend.date.simple.functions.set
After changing this line:
1$dateTimeObject->set($tr['time']);
with
1$dateTimeObject->set($tr['time'], Varien_Date::DATETIME_INTERNAL_FORMAT);
the issue was fixed and the order totals were shown correctly in Reports->Sales->Order screen.
Important Note: After the above change it is required to re-build lifetime statistics of Orders to update database table sales_order_aggregated_created.
Make the change by copying the core file to your local so that future upgrade will not overwrite your fix.
Or
you can also see this link:
http://magento.stackexchange.com/questions/25993/magentos-sales-orders-report-is-wrong
Regards
Manish