cancel
Showing results for 
Search instead for 
Did you mean: 

Reports->Sales->Orders showing different info

SOLVED

Reports->Sales->Orders showing different info

Hi,

 

this question was asked before but as no replies and was quite some time back:

 

https://community.magento.com/t5/Technical-Issues/Magento-Report-showing-no-records-after-a-particul...

 

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Reports->Sales->Orders showing different info

We have come across this solution

 

Steps to reproduce:

  1. Login in Admin panel
  2. Go to Reports->Sales->Orders screen
  3. Filter orders for some date range which should fall in Daylight savings time.
  4. 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']);

$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

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions

View solution in original post

1 REPLY 1

Re: Reports->Sales->Orders showing different info

We have come across this solution

 

Steps to reproduce:

  1. Login in Admin panel
  2. Go to Reports->Sales->Orders screen
  3. Filter orders for some date range which should fall in Daylight savings time.
  4. 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']);

$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

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions