Jump to content

sgpaul

Retired Forum Member
  • Posts

    32
  • Joined

  • Last visited

Everything posted by sgpaul

  1. I would suggest to whmcs team to have separate modules plesk and plesk9 so we can handle both if we have servers with different servers. I tried to create a plesk9 module by copying the plesk files to plesk9 but I guess in the code there are references to plesk so plesk9 is not available in the modules drop down of the server config.
  2. it would be nice to have a url variable to hide the menu on the order form. Thanks
  3. Just for the record, the empty support messages were happening when created online, not through email piping. These happened randomly, it has not happened since we moved the system to another server. Fingers crossed! Pablo
  4. Here is a report that list expected monthly renewals. Hope is useful for anyone. Feel free to enhance/fix/contribute. Pablo <?php // Monthly Income Forecast v0.1 - Developed by sgpaul -- 2007-12-26 $months = array('', 'January','February','March','April','May','June','July','August','September','October','November','December'); if ($year=="") { $year=date("Y"); } if ( !isset( $aggregate) ) $agregate = 0; $reportdata["title"] = "Monthly Income Forecast for ".$year; $reportdata["description"] = "This report shows forecast income for all year by month"; $reportdata["tableheadings"] = array("Month", "Renewals","Monthly","Annual","Biennially", "Other", "Total"); $grandtotal = 0; $total_renewals = 0; $monthly = 0; for ( $month = 1; $month <= 12; $month ++ ) { $sql = 'select amount, billingcycle, nextduedate from tblhosting where domainstatus="active" and nextduedate LIKE "'.$year.'-'.str_pad($month,2,"0",STR_PAD_LEFT).'-%"'; $result = mysql_query($sql); $renewals = mysql_num_rows( $result ); if ( ! $aggregate ) $monthly = 0; $annually = 0; $biennually = 0; $other = 0; $total = 0; while ( $data = mysql_fetch_assoc( $result ) ) { switch( $data['billingcycle'] ) { case 'Monthly': $monthly += $data['amount']; break; case 'Annually': $annually += $data['amount']; break; case 'Biennially': $biennually += $data['amount']; break; default: $other += $data['amount']; break; } } $total += $monthly + $annually + $biennually + $other; $grandtotal += $total; $total_renewals += $renewals; $reportdata["tablevalues"][] = array($months[ $month ], number_format( $renewals, 0 ),number_format( $monthly, 2 ),number_format( $annually, 2 ), number_format( $biennually, 2 ),number_format( $other, 2 ), number_format( $total, 2 ) ); } //<--end of while $reportdata["headertext"] = "Total Renewals: $total_renewals"; $reportdata["headertext"] = "<a href=\"$PHP_SELF?report=$report&year=$year&aggregate=".( ! $aggregate)."\">Toggle monthly aggregation</a>"; $data['footertext'] = "<p style=\"text-align:center\"><span style=\"font-size:2em; margin:10px auto; font-weight:bold;\">Total: ".$CONFIG["CurrencySymbol"].number_format( $grandtotal, 2 )."</span> "; $data['footertext'] .= " </p>"; $data["footertext"].="<table width=90% align=center><tr><td>"; $data["footertext"].="<a href=\"$PHP_SELF?report=$report&aggregate=$aggregate&year=".($year-1)."\"><< ".($year-1)."</a>"; $data["footertext"].="</td><td align=right>"; $data["footertext"].="<a href=\"$PHP_SELF?report=$report&aggregate=$aggregate&year=".($year+1)."\"> ".($year+1)." >></a>"; $data["footertext"].="</td></tr></table>"; ?>
  5. I am not sure if recent updates to WHMCS broke this report, but it didn't work on mine, so I fixed it and added a few more features like currency formatting & product name display. <?php // Added by yabado 9-24-07 // Modified by sgpaul 12-26-2007 $hostcnt=0; $hostdomcnt=0; $domcnt=0; $orderis = array(); $months = array('January','February','March','April','May','June','July','August','September','October','November','December'); if ($month=="") { $month=date("m"); $year=date("Y"); } $pmonth = str_pad($month, 2, "0", STR_PAD_LEFT); $reportdata["title"] = "New Orders for ".$months[$month-1]." ".$year; $reportdata["description"] = "This report shows all new orders for a given month"; $query = "SELECT tblorders.*,tblclients.firstname,tblclients.lastname, tblpaymentgateways.value, tblhosting.id as hostingid, tbldomains.id as domainids, tbldomains.type as domaintype, tblproducts.name as productname FROM tblorders INNER JOIN tblclients ON tblclients.id=tblorders.userid INNER JOIN tblpaymentgateways ON tblpaymentgateways.gateway=tblorders.paymentmethod left JOIN tblhosting ON tblhosting.orderid=tblorders.id left JOIN tbldomains ON tbldomains.orderid=tblorders.id left JOIN tblproducts ON tblproducts.id=tblhosting.packageid WHERE tblpaymentgateways.setting='name' AND date like '$year-$pmonth%' ORDER BY date ASC"; $result = mysql_query($query); // Added Prodyct to headers -yabdabo $reportdata["tableheadings"] = array("Order ID","Order #","Order Date","Client","Product","Amount","Promotion Code","Payment Method","Status"); while ($data = mysql_fetch_array($result)) { $id = $data["id"]; if ( array_search( $id, $orderis ) === false ) { $orderis[] = $id; $ordernum = $data["ordernum"]; $userid = $data["userid"]; $date = $data["date"]; $amount = $CONFIG["CurrencySymbol"].$data["amount"]; $promo = $data["promocode"]; $paymentmethod = $data["value"]; $status = $data["status"]; $productname = $data["productname"]; $date = fromMySQLDate($date); $clientname = $data["firstname"]." ".$data["lastname"]; if ( $promo=="") { $promo="-"; } // Add by yabado 9-24-07 $hostingid = $data['hostingid']; $domainids = $data['domainids']; // todo: explode domainids to show multiple links if needed. if($hostingid && !$domainids){ $product = "<a href=\"clientshosting.php?userid=$userid&hostingid=$hostingid\" target=\"_blank\" />$productname</a>"; $hostcnt++; $hosttotal += $data['amount']; }else if($hostingid && $domainids){ $product = "<a href=\"clientshosting.php?userid=$userid&hostingid=$hostingid\" target=\"_blank\" />$productname/Domain ( ".$data['domaintype']." )</a>"; $hostdomcnt++; $hostdomtotal += $data['amount']; }else if(!$hostingid && $domainids){ $product = "<a href=\"clientsdomains.php?userid=$userid&domainid=$domainids\" target=\"_blank\" />Domain ( ".$data['domaintype']." )</a>"; $domcnt++; $domaintotal += $data['amount']; }else{ $product ="unknown"; } $grandtotal += $data['amount']; // Added $product to results -yabdao $reportdata["tablevalues"][] = array("$id","$ordernum","$date","$clientname","$product","$amount","$promo","$paymentmethod","$status"); } } //<--end of while $num_rows = count( $orderis ); $reportdata["headertext"] = "Total New Orders: $num_rows"; // Added by yabado 9-24-07 $data['footertext'] = "<p style=\"text-align:center\"><span style=\"font-size:2em; margin:10px auto; font-weight:bold;\">Total: ".$CONFIG["CurrencySymbol"].number_format( $grandtotal, 2 )."</span> "; $data['footertext'] .= "Hosting Only: $hostcnt ( ".$CONFIG["CurrencySymbol"].number_format( $hosttotal, 2 )." ) | "; $data['footertext'] .= "Hosting/Domain: $hostdomcnt ( ".$CONFIG["CurrencySymbol"].number_format( $hostdomtotal, 2 )." ) | "; $data['footertext'] .= "Domain Only: $domcnt ( ".$CONFIG["CurrencySymbol"].number_format( $domaintotal, 2 )." ) </p>"; $data["footertext"].="<table width=90% align=center><tr><td>"; if ($month=="1") { $data["footertext"].="<a href=\"$PHP_SELF?report=$report&month=12&year=".($year-1)."\"><< December ".($year-1)."</a>"; } else { $data["footertext"].="<a href=\"$PHP_SELF?report=$report&month=".($month-1)."&year=".$year."\"><< ".$months[($month-2)]." $year</a>"; } $data["footertext"].="</td><td align=right>"; if ($month=="12") { $data["footertext"].="<a href=\"$PHP_SELF?report=$report&month=1&year=".($year+1)."\">January ".($year+1)." >></a>"; } else { $data["footertext"].="<a href=\"$PHP_SELF?report=$report&month=".($month+1)."&year=".$year."\">".$months[(($month+1)-1)]." $year >></a>"; } $data["footertext"].="</td></tr></table>"; ?> regards, Pablo
  6. vBulletin may be better, but searching is a pain in the butt now. can the image code be entered once per session instead of every search?
  7. I am having problems with the support tickets. Some messages sent from the web are arriving empty, not all of them, there seems to be something that causes the message to arrive empty, anyone having this problem? I don't know what is triggering it since customers are sending this and I cannot bother them with this. thank you Pablo
  8. When a new order comes in, and I go ahead and accept the order, I check create account and send welcome email. Since last version 3.4.0 the email is not sent upon successful creation. I have to set the order as pending, and accept the order again, only checking "send welcome email" and this time the email is sent. is someone else having this problem? has it been reported/planned to fix? Thanks Pablo
  9. I have the problem, although the log says that the fraud check passed, still no table with fraud details. any ideas?
  10. thank you! was looking in the wrong place...
  11. We are using enom. Is it possible to disable automatic domain registration for new orders? We don't want that since we have received some fraudulent orders. Thanks
  12. I am having the same problem, what was the solution for this? thanks
  13. look in the above link to the order thread which includes a link to download the patch.
  14. Hello, Since the client area has a different domain as the secure area (where the order form resides), when a visitors hits the * page for the affiliates that resides in the client area, the cookie does not carry over to the secure domain where the order form is. Is there any configuration setting for this? Any work around? Thank you
×
×
  • 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