flangefrog Posted October 20, 2014 Report Posted October 20, 2014 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
Tyson Posted October 20, 2014 Report Posted October 20, 2014 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. Michael and Blesta Addons 2
Tyson Posted October 21, 2014 Report Posted October 21, 2014 Fixed in CORE-1487 Blesta Addons, Michael and flangefrog 3
Recommended Posts