Jump to content

income forecast report not count addon prices


isol

Recommended Posts

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

Link to comment
Share on other sites

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( ...

.

.

.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated