isol Posted December 4, 2012 Share Posted December 4, 2012 we add an product addon to an hosting account. the income forecast report is the same -> so addons are not counted can reproduce it. only have to : 1) add an addon with status active and recuring 1000 2) there is no report over the +10000 income can you fix it? thanks the report is important to us 0 Quote Link to comment Share on other sites More sharing options...
isol Posted December 5, 2012 Author Share Posted December 5, 2012 nobody with this problem? 0 Quote Link to comment Share on other sites More sharing options...
isol Posted December 6, 2012 Author Share Posted December 6, 2012 we fixed it by adding (do not add # lines): #$result = select_query("tblhosting","",array("domainstatus"=>"Active","currency"=>$c ... # # SOME CODE # # } else { # $recurrence = 24; # } # $recurrences = 24/$recurrence; # for ($i=0;$i<=24;$i+=$recurrence) { # $new_time = mktime(0,0,0,$month+$i,1,$year); # $totals[date("Y",$new_time)][date("m",$new_time)][$recurrence] += $recurringamount; # } $result = select_query("tblhostingaddons","",array("status"=>"Active"),"","","",""); while ($data = mysql_fetch_array($result)) { $recurringamount = $data["recurring"]; $nextduedate = $data["nextduedate"]; $billingcycle = $data["billingcycle"]; $nextduedate = explode("-",$nextduedate); $year = $nextduedate[0]; $month = $nextduedate[1]; if ($billingcycle=="Monthly") { $recurrence = 1; } elseif ($billingcycle=="Quarterly") { $recurrence = 3; } elseif ($billingcycle=="Semi-Annually") { $recurrence = 6; } elseif ($billingcycle=="Annually") { $recurrence = 12; } elseif ($billingcycle=="Biennially") { $recurrence = 24; } else { $recurrence = 24; } $recurrences = 24/$recurrence; for ($i=0;$i<=24;$i+=$recurrence) { $new_time = mktime(0,0,0,$month+$i,1,$year); $totals[date("Y",$new_time)][date("m",$new_time)][$recurrence] += $recurringamount; } } # $result = select_query("tbldomains","",array( ... . . . 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.