Jump to content

About a report


Giannis

Recommended Posts

Hello

I use WHM in greece and for gr domains the minimum registration time for is 2 years.

By editing one of the predefined reports i took this code

 

<?php

 

$reportdata["title"] = "Domains";

$reportdata["description"] = "";

$reportdata["tableheadings"] = array("Item Name","Bienially Revenue","Annual Revenue","Total Yearly Revenue");

 

$annually = 0;

$query = "SELECT * FROM tbldomains WHERE status!='Expired'";

$result=mysql_query($query);

while($data = mysql_fetch_array($result)){

$amount = $data["recurringamount"];

$registrationperiod = $data["registrationperiod"];

if ($registrationperiod<2)

{$registrationperiod=2;

}

$annually=$annually+($amount/$registrationperiod);

}

$annually=number_format($annually,2,".","");

$servertotal=number_format($annually,2,".","");

$overalltotal=$overalltotal+$servertotal;

 

$reportdata["tablevalues"][] = array("Domains",$CONFIG["CurrencySymbol"]."0.00",$CONFIG["CurrencySymbol"]."$annually",$CONFIG["CurrencySymbol"]."$servertotal");

 

$overalltotal=number_format($overalltotal,2,".","");

?>

 

i want to display all gr domains under Bienially Revenue and all the other domains i have .com .net under Annualy and also the total of all domains at total section.

 

Could some one help me on fixing this?

 

Thank You

Link to comment
Share on other sites

When you are adding domain names to Domain Pricing (admin/configdomains.php) on WHMCS, you specify the amount of REQUIRED years under "Registration Period."

 

When that domain extension appears, the client has to pay the minimum requirement. So if a .NU registration period is two years, you have "2" under the registration period, and of course you have the registration price/tranfser/renewal rates reflect that two year period.

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