Jump to content

Billing Overview Year To Date Graph Incorrect


Recommended Posts

Posted

The graph caclculates each month from 2014-01-01 00:00:00 to 2014-02-31 23:59:59 when it should be from 2014-01-01 00:00:00 to 2014-01-31 23:59:59. This results in double the actual yearly revenue when each month is added up.

 

The solution is to move

$end = strtotime($date_start . " +1 " . $interval);

below

$date_end = $this->Date->cast($end, "Y-m-" . ($month_interval ? "t" : "d") . " 23:59:59"); 

A vQmod is attached as a temporary workaround.

fix_billing_graph.xml

Posted

The issue appears to be dependant on the timezone. While your fix may work for you, it would be incorrect for other timezones where it may produce invalid results into the past, and so it should not be used either.

e.g.

from 2014-01-01 00:00:00 to 2013-12-31 23:59:59

 

Added as CORE-1487 for v3.3.2.

Guest
This topic is now closed to further replies.
×
×
  • Create New...