Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 05/17/21 in all areas

  1. 2 points
    that is true and makes much more sense that what the docs say. hmm... I wonder if a cron hook that runs after the client status sync, but before the pruning task (I assume they occur in that order), that sets a client with a positive balance to Active status.... under those circumstances, I don't think the pruning task would touch it... though whether that would impact on active client numbers and your license level i'm not sure. this is one of those features that I would never enable... though if I did need it, i'd probably write my own pruning task hook where I determine the conditions and skip the default cron task option... if the PreDeleteClient had an abort option, then that could be useful here, but then we're down the road of submitting another feature request.
  2. 2 points
  3. 2 points
    You can find all information about electronic invoicing & WHMCS here. I understand that it's a 10000-words article but there's everything you need to know. There are no alternatives and will never be since the profit / complexity ratio is hugely unbalanced. As brian said, I'm no longer in the mood to work this hard on this platform. I'm focusing on a small group of customers and working on new projects not connected to WHMCS. If you have any question, probably this is the best place to ask ๐Ÿ˜…
  4. 2 points
    it was in late April - I spotted it on the 26th, so sometime before then I think.
  5. 2 points
    a good question. the navigation has always been weirdly inconsistent, e.g if you're editing a product and save it, then it shows a link back to the products list; try to do the same on product addons... and as you say, nothing - no link back. for me it's not a practical issue as I have a back button on the mouse, but I can well imagine what a pain it would be without it. you mean.... ? <?php # Remove MC Block from System Settings Hook # Written by brian! function admin_custom_css_remove_mc_hook($vars) { if ($vars['pagetitle'] == AdminLang::trans('setup.title')) { $head_return = '<style> #setupLinks .link-container:nth-child(4) {display: none !important;} .col-md-8 {width: 100% !important;} .tasks {display: none !important;} </style>'; return $head_return; } } add_hook("AdminAreaHeaderOutput",1,"admin_custom_css_remove_mc_hook"); the first CSS line gets rid of the MarketConnect box. Note: check it still works after every update because the hook is just using CSS to remove the 4th box - so if WHMCS changes its position in the output, you'll have to adjust the CSS accordingly... as per usual, they are not using unique IDs on these classes. ๐Ÿ™„ the second and third lines remove the "Setup Tasks" block on the right and adjust the width of the output to 100% - if you don't want to do this, just remove those two lines.
  6. 2 points
    We are using all almost all opensource solution ( no more monthly fees !!! ) : If bot can not answer, we derive to chat, If chat operator can not answer, a ticket is opened. We aim to avoid an email ticket asking how to configure pop3 or dummy questions Telegram + Chat + Bot + AI + Whatsapp integration = www.livehelperchat.com Knowledge = bookstackapp.com CRM = ESPOcrm.com Calendar = https://easyappointments.org/ Tickets (mail, facebook, twitter, integration) = zammad.org or chatwoot.com ( we are not decide it yet ) Automatic Invoicing - Payments - Integration with servers... = we are still using whmcs ๐Ÿ˜ช ja ! we can not find a good solution yet, but we are migrating to wisecp hosting customers. And if you are a pro developer, integrate all them with apis using n8n.io (also opensource, of course)
  7. 1 point
    it's strange that some of those TLDs were on any list... reminded me of the old v6 days when WHMCS found a list of TLDs, added them to the database and didn't even bother to check if some of therm were a) valid and/or b) brands (and therefore not available for public registration). I think that I probably didn't emphasise above the importance of the $validtemplates array and how it defines which templates will be shown with sidebars.... if you're saying that you don't want any of the cart pages to include any sidebars, then it's just a case of removing the registration/transfer templates from the array - the quickest way being to either comment that line or or remove it entirely. //$validtemplates = array("domainregister","domaintransfer");
  8. 1 point
    you will still need to create a new data feed - as the default data feeds will get overwritten during a WHMCS update.
  9. 1 point
  10. 1 point
    ... and should only be available to "Product" type email templates.
  11. 1 point
    It should be a simple fix really for a major issue, you don't necessarily find out about the issue until an angry client gets in touch asking why you've been ignoring them, then you have to blame WHMCS for breaking something that was working fine.
  12. 1 point
    Of course and it is actually really easy. Years ago I had a WHMCS page that was showing on Google Maps the location/address of all the authorized resellers of a provider (it was taking data from a specific client group). Openstreet is pretty much the same.
  13. 1 point
    To get service_custom_field_cpfnumber, you would need to go through the service_custom_fields_by_name array, check the name variable and if it is cpfnumber, then show. {foreach from=$service_custom_fields_by_name item=customfield} {if $customfield.name eq 'cpfnumber'} {$customfield.name}: {$customfield.value} {else} {/foreach} The service_custom_fields_by_name array uses numbers for keys and not the custom field name and thus you have to go hunt for it.
  14. 1 point
    Sure, a module can do nearly anything if it can be coded . ๐Ÿ˜‰ Check their develop page, specifically the show the map pages.
  15. 1 point
    A feature request? I should think something like this deserves a bit more attention that a 4 year wait to see if it's an issue that needs fixing (or is in fact a feature that needs discussion).
  16. 1 point
    Does this mean you need a Support contract to be able to change server? I mean will they still accept support tickets like this when the support contract expires of my live long license? Wouldn't it be better when the license check is Domain and DNS based in stead of IP address based. After all the IP address can be retrieved from a simple DNS query with PHP's dns_get_record which can do both A and AAAA. I mean why would it need to be manual with a support ticket? Is that to force us to have a license with support?
  17. 1 point
    I didn't have that information but they were quite slow and unattentive to new customers, but at least its a point to start. We could code everything from scratch, which remains an option for a bit later, but for start seems like a fair deal. I think it would work for at least a year at least. Maybe until tan someone else will do something new. yes optimism dies last ... ๐Ÿ˜„
  18. 1 point
    I take it you're a new employee and/or user of WHMCS. ๐Ÿ™„ https://developers.whmcs.com/themes/css-styling/ all.min.css would get overwritten during an update - the user should add any client area custom CSS to the theme's custom.css file... but always keep a backup of it.
  19. 1 point
    I was able to solve this by following this
  20. 1 point
    If you have specified multiple billing cycles for your products, and a client want to up- or downgrade to another plan, they are going to be billed incorrectly if they also switch their billing period while doing so. Here's an example. I have a product that costs 900DKK per year. Client wants to upgrade to a product that costs 1900 per year. If they keep the billing cycle annually, everything is good. I expect they would pay 1000DKK on the first day of their billing period. However - if they client choses "monthly" billing cycle while doing the upgrade, nothing makes sense anymore. The client now has to pay MORE, even though they've already prepaid for a year. I've already mentioned this to WHMCS, but apparantly this is by design and I should create a feature request (which I did - not live though, yet: https://requests.whmcs.com/idea/change-how-upgradedowngrade-amount-works-when-changing-billing-cycle) Saying something is "by design" doesn't mean that it's correct. It just means it is meant to be that way - but it's obviously very incorrect. When a client goes from yearly -> monthly, they need to pay more - if they go the other way around, they need to pay less. Wouldn't the issue be solved if WHMCS stopped taking the new billing cycle into account and just used the current billing cycle?
  21. 1 point
    *sighs and hits head against a brick wall* when I asked you on Monday where you wanted to do this, there was a good reason for doing so - namely, the answer you gave determined the best solution. so if you had said only PDF, then you just modify the invoicePDF template; if only the HTML template, you use a CAPVI hook; if everywhere, then you would use a hook to modify the relevant line items before they're sent to the client and that removes the need to modify any client area or email templates. *sighs again* ๐Ÿ™„ the array structure is the same in the email template as it is in the client area, so in the email template, you could replace... {$invoice_html_contents} with... {foreach from=$invoice_items item=data} {$data.description}{if $data.type eq "Hosting"}<br />Service ID: {$data.relid}{/if}: {$data.amount} {/foreach} it probably wouldn't look as neat as the contents string, but you could put the foreach output in a table to make it cleaner if you wanted to... you'd also have to add the subtotal/credit/tax/total summaries etc. the invoicing hook would really be the way to go, but that's not one for me to write.
  22. 1 point
    Hi Ed, Currently we do not have an official WHMCS Discord server but it is something we could consider if there is demand for one.
  23. 1 point
    I think your only option will be Billing Extension
  24. 1 point
    as the others have said, this was intentional and designed to mask how old any request is... there are ways to find out how old a request is, but not worth highlighting those methods here. at least if any comments have been left (and not deleted), then that can give you a rough estimate of its age.
  25. 1 point
    Even we use Vision Helpdesk excellent tool with lots of features using it since 2010. As they offer download, SAAS options is good to select as per privacy requirement. Infact we got news for their team they are launching chat tool as well so all should work for us from one location.
  26. 1 point
    It's worse than that. I visit my admin on more than one installation every single day. What I don't do is to log totally off and back in again, and this has apparently been randomly causing one or both to fail the check. Recent changes are bad enough, but having to play whackamole with licensing by checking that daily is yet another thing WHMCS has done that inhibits productivity lately. Glad they didn't raise pricing on top of.....oh. :(
  27. 1 point
    the $order_details merge field is created during the order creation and consists of language variables and variables - but once written and passed to the template, the merge field is just one long string of text/html - so changes to the language strings will have no effect on it (the email templates don't use Language strings in the same sense as the web site templates anyway). so changes to relevant language strings would only impact the content of $order_details in future orders.
  28. 1 point
    .. and remember not to edit the original vat_moss.php report file - duplicate it and edit that... the original will get overwritten during an update and any changes you make to it would be lost.
  29. 1 point
    are they using the same IP each time they submit? if so, you could block their IP via your hosting panel, or even htaccess. also, do a Google search on that email address - you're are not alone and seems to have a similar outlook.com address too. the hook itself is nothing special... <?php add_hook('TicketOpenValidation', 1, function($vars) { if ($vars['email'] == "eric.jones.z.mail@gmail.com") { return "Go away you little spammer!"; } }); similarly, you could see if his website is mentioned in the ticket message and block them that way too. if you can identify an IP (or block) for this spammer, then i'd probably go down that road... the problem with validating the ticket is that if they really want to spam you, they'll just change the email address/message to get past the check (even if you faked it to look like a success message).
  30. 1 point
    Yes, WHMCS is an amazing and fantastic automation tool for Product management, Support and billing module for the online businesses.
  31. 1 point
    Nope, a dispute is not necessary. Registrant just needs to prove his identity to Registrar, and the Registrar is required to give him some way to manage his domain. Every TLD and every Registry have his own rules, but check i.e. ICANN rules about common gTLD: ruled obligations are between registrar and registrant, the reseller may stay in the middle, but if he disappears registrar and registrant have direct intercourse. I.e. about Publicdomainregistry (Directi): registrant just need to go to this page: https://publicdomainregistry.com/compliance/ and compile the form to get in touch with Registrar and get the control of his domain. And EVERY Registrar on this planet have some kind of procedure like this.
  32. 1 point
    Oh wow. Long way away! lol
  33. 1 point
    Thanks for posting this! I'd believed WHMCS when they said it was no longer possible to create custom APIs so it's nice to see how I can still manage it.
  34. 1 point
    6.0.7 isn't affected by these CVEs ๐Ÿ™‚ Maybe that works. If you are forced to stay on WHMCS 7.10 and later on a security vulnerability becomes known, you can at least try that. If this does not work, it would be possible write a wrapper so that it still works (i.e. restore compatibility via custom PHP code). However, i wouldn't suggest that if you are not a dev. And even if you are a dev, the recommended way would be to keep WHMCS up to date. Even though I know how annoying the version cycle of WHMCS is.
  35. 1 point
    not using Smarty - you have two options, HTML or use specific TCPDF code. i'm assuming the EFT details are coded in an HTML table (doesn't matter if they're not) - but you could reproduce the same code again... $pdf->Ln(5); $tblhtml = '<table width="100%" cellspacing="1" cellpadding="2" border="0"> <tr height="30" style="font-weight:bold;"> <td align="center">Click <a href="https://www.google.com">here</a> to go to Google</td> </tr> </table>'; $pdf->writeHTML($tblhtml, true, false, false, false, ''); obviously, styling & content can be changed in the HTML code - which I assume you'll be more familiar with than TCPDF. ๐Ÿ™‚
  36. 1 point
  37. 1 point
    Yeah we should be ok for another year or more though I wouldnt push it beyond that. In mean time I am exploring other options available to us and will reach out to Clientexec + Blesta this week to see which product is going to be the best fit for our businesses. This has such a knock on affect, for example, it makes no sense for us to keep our support and updates active with modules garden as there wont be any further updates to any of our whmcs owned licenses and most of the issues have been resolved. This negatively affects them and beyond their control. If I were Konrad @ModulesGarden I would seriously consider writing a whmcs replacement considering the knowledge that his team have of the product. Furthermore they have the user base to promote the product and would succeed. I would support any whmcs replacement product that they released.
  38. 1 point
    Short term, month to month yes monthly is cheaper but I was looking at long term, years out -- look at my math again. Over 5 years if paying $19, it is $1140 compared to $624 . They lost over $500 in potential income for one owned license during that time. And thus is why owned / lifetime / one time pay licenses mean jack cheese to me and have not used them and with this probably wont. I'd rather pay them that $500 and perhaps then the company may not do stuff like this. (but obviously each company is different) Not sure if that is directed at me, but I never claimed it was or wasn't deception. I think stopping renewal of support / updates is a bad / wrong move -- unless they are discontinuing WHMCS it self. I do not disagree with you and I have posted on other threads here or WHT about SaaS WHMCS. At that point, if I am still using WHMCS, I would be switching to Blesta or something else -- even if I have to spend money or time and build modules or even building the system I have been thinking about for a while. Heck I can barely stand them having call homes as it is. Even before this I had started building modules that could potentially be used within other systems with coding to their own ways of doing stuff. For my use case, Blesta would only need 2 or 3 modules built to cover everything in use now and could probably get away with just 1 and figure something out for the other.
  39. 1 point
    Of course, it's cheaper to pay monthly. You don't actually believe people that purchased owned licenses are stupid right? ๐Ÿ˜„ The reason a company sells one time payments for a higher price and people are willing to pay, is because you see it as an investment, not an expense or monthly subscription. This is also why you can book it in accounting, as digital assets vs expenses. What has the date of the screenshot anything to do with this? If you purchased one-time before, you expect that purchase promise to be honored as long they are in business. Not new sales but previous sales? Every company honors them, unless they expect to never have new customers again which would be concerning for any company. And before you claim this is not sustainable plenty of companies do this as a reward to initial customers that made them who they are, at least with software that does not cost them anything as opposed to leased services. Affinity is one example. I truly have paid one time for both of their software and have received free updates for years now. Paul from Blesta said the same thing in a community recently, that they see it as a way to reward those that initially believe in his product and company. Its not as you will have one time sales forever, new purchases are a different story, you just honor those that actually made you as a brand and company and to finalize, it's not as they are not making any money from them anymore. I always have renewed support and updates and I also purchased all their extra add-ons and modules that are officially developed by WHMCS. Don't even get me into that link that goes to their terms of service. You see their sales page, read one thing, and then they change it. This is a very gray area. To back pedal on your initial selling promise. I purchased ONE TIME because they promised me I could then later buy support and updates per year. Now they are telling me, sorry, your one time purchase is worthless, and we are not going to allow you to buy updates from us anymore in the future. Assuming it was cheaper for me to pay by month, then it was a deception trick. I paid a higher price expecting to receive something of value and instead I paid more for something that will be worthless soon. How can you claim this is not deception? I paid for Unlimited Customers and Unlimited Staff and Unlimited products. Now WHMCS is forcing me to a limited customer model. This is not what I purchased initially. And they refuse to sell me further updates which is a way to force you out. Just wait until WHMCS start to charge you extra for every staff account and wait until they charge extra per active product you have. All my predictions about WHMCS over the years have become true. I said this before, their customer license model is only the start. If you expect to run WHMCS in your existing plan then I have bad news for you. Self-hosted licenses are completely going away. Even if they say the opposite today, they said the same thing about owned licenses in public. Trust me, self hosted WHMCS is dead. They will eventually start to push you out as they move to their SaaS whmcs hosted only. At that point, your database and customers are theirs, they can will probably move to a % model that charges you based on the amount of sales you make every month. Good luck if you don't believe me but that is what WHMCS is going for. They want to be sort of Apple that charges 30% cut to every developer and they force everyone to only be able to sell using Apple payments. WHMCS is going that way. I would not be surprised if in the future they completely ban modules like Stripe or Specific domain modules and force you to use their Reselling account and their merchant payment system. They want a cut of your business and they are not stopping here.
  40. 1 point
  41. 1 point
    You must be new here. They don't care about loyal customers but money. Many of us here are loyal to the brand for years and have tried to help others, as well wasted countless hours trying to make WHMCS better. We always got silence. WHMCS will not change because a few customers whine about pricing. Their already huge and are making more profit every year. They don't want lousy customers paying a few bucks a month. I don't think you understand what WHMCS wants as a company. They want to move into a leased SaaS model, one you will have to pay them a share of your profits, for every customer and every thing you sell. Why else do you think they even launched something like the MarketConnect...
  42. 1 point
    also, I think their terms have always been governed by English law, rather than US law - so that might make a class action case a little more complicated.
  43. 1 point
    Hi, Do you use CloudLinux at all? If so, please try switching from pdo_mysql to nd_pdo_mysql (native driver) within the Cloudlinux PHP configuration and check again. The CloudLinux pdo_mysql build appears to have some quirks about the way it handles integers (or at least we have observed unexpected behavior), but the native driver does not.
  44. 1 point
    I just fixed the issue for us. I will share the code with you. Just save it into an extra file income_by_product_yearly.php in the module/report folder <?php //Modifizierte income_by_product.php von Max //Ausgabe nach Jahren nicht mehr nach Monaten //16.02.2021 use Illuminate\Database\Query\Builder; use WHMCS\Carbon; use WHMCS\Database\Capsule; if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } //$pmonth = str_pad((int)$month, 2, "0", STR_PAD_LEFT); $year = $year; $reportdata["title"] = "Income by Product for " . $year; $reportdata["description"] = "This report provides a breakdown per product/service of invoices paid in a given month. Please note this excludes overpayments & other payments made to deposit funds (credit), and includes invoices paid from credit added in previous months, and thus may not match the income total for the month."; $reportdata["currencyselections"] = true; $reportdata["tableheadings"] = array("Product Name","Units Sold","Value"); $products = $addons = array(); $dateRange = Carbon::create( $year, 1, 1 ); # Loop Through Products $result = Capsule::table('tblinvoiceitems') ->join('tblinvoices', 'tblinvoices.id', '=', 'tblinvoiceitems.invoiceid') ->join('tblhosting', 'tblhosting.id', '=', 'tblinvoiceitems.relid') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->whereBetween( 'tblinvoices.datepaid', [ $dateRange->startOfYear()->toDateTimeString(), $dateRange->endOfYear()->toDateTimeString(), ] ) ->where(function (Builder $query) { $query->where('tblinvoiceitems.type', 'Hosting') ->orWhere('tblinvoiceitems.type', 'Setup') ->orWhere('tblinvoiceitems.type', 'like', 'ProrataProduct%'); }) ->where('currency', $currencyid) ->groupBy('tblhosting.packageid') ->select( [ Capsule::raw('tblhosting.packageid as packageId'), Capsule::raw('COUNT(*) as unitsSold'), Capsule::raw('SUM(tblinvoiceitems.amount) as amount') ] )->get(); foreach ($result as $data) { $products[$data->packageId] = [ 'amount' => $data->amount, 'unitssold' => $data->unitsSold, ]; } $result = Capsule::table('tblinvoiceitems') ->join('tblinvoices', 'tblinvoices.id', '=', 'tblinvoiceitems.invoiceid') ->join('tblhosting', 'tblhosting.id', '=', 'tblinvoiceitems.relid') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->whereBetween( 'tblinvoices.datepaid', [ $dateRange->startOfYear()->toDateTimeString(), $dateRange->endOfYear()->toDateTimeString(), ] ) ->where('tblinvoiceitems.type', 'PromoHosting') ->where('currency', $currencyid) ->groupBy('tblhosting.packageid') ->select( [ Capsule::raw('tblhosting.packageid as packageId'), Capsule::raw('COUNT(*) as unitsSold'), Capsule::raw('SUM(tblinvoiceitems.amount) as amount') ] ) ->get(); foreach ($result as $data) { $products[$data->packageId]["amount"] += $data->amount; } # Loop Through Addons $result = Capsule::table('tblinvoiceitems') ->join('tblinvoices', 'tblinvoices.id', '=', 'tblinvoiceitems.invoiceid') ->join('tblhostingaddons', 'tblhostingaddons.id', '=', 'tblinvoiceitems.relid') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->whereBetween( 'tblinvoices.datepaid', [ $dateRange->startOfYear()->toDateTimeString(), $dateRange->endOfYear()->toDateTimeString(), ] ) ->where('tblinvoiceitems.type', 'Addon') ->where('currency', $currencyid) ->groupBy('tblhostingaddons.addonid') ->select( [ Capsule::raw('tblhostingaddons.addonid as addonId'), Capsule::raw('COUNT(*) as unitsSold'), Capsule::raw('SUM(tblinvoiceitems.amount) as amount') ] )->get() ->all(); foreach ($result as $data) { $addons[$data->addonId] = [ 'amount' => $data->amount, 'unitssold' => $data->unitsSold, ]; } $total = 0; $itemtotal = 0; $firstdone = false; $result = Capsule::table('tblproducts') ->join( 'tblproductgroups', 'tblproductgroups.id', '=', 'tblproducts.gid' ) ->orderBy('tblproductgroups.order') ->orderBy('tblproducts.order') ->orderBy('tblproducts.name') ->get( [ 'tblproducts.id', 'tblproducts.name', Capsule::raw('`tblproductgroups`.`name` as groupname') ] ) ->all(); foreach ($result as $data) { $pid = $data->id; $group = $data->groupname; $prodname = $data->name; if ($group!=$prevgroup) { $total += $itemtotal; if ($firstdone) { $reportdata["tablevalues"][] = array('','<strong>Sub-Total</strong>','<strong>'.formatCurrency($itemtotal).'</strong>'); $chartdata['rows'][] = array('c'=>array(array('v'=>$prevgroup),array('v'=>$itemtotal,'f'=>formatCurrency($itemtotal)))); } $reportdata["tablevalues"][] = array("**<strong>$group</strong>"); $itemtotal = 0; } $amount = $products[$pid]["amount"]; $number = $products[$pid]["unitssold"]; $itemtotal += $amount; if (!$amount) $amount="0.00"; if (!$number) $number="0"; $amount = formatCurrency($amount); $reportdata["tablevalues"][] = array($prodname,$number,$amount); $prevgroup = $group; $firstdone = true; } $total += $itemtotal; $reportdata["tablevalues"][] = array('','<strong>Sub-Total</strong>','<strong>'.formatCurrency($itemtotal).'</strong>'); $chartdata['rows'][] = array('c'=>array(array('v'=>$group),array('v'=>$itemtotal,'f'=>formatCurrency($itemtotal)))); $reportdata["tablevalues"][] = array("**<strong>Addons</strong>"); $itemtotal = 0; $result = Capsule::table('tbladdons') ->orderBy('name') ->get( [ 'id', 'name', ] ) ->all(); foreach ($result as $data) { $addonid = $data->id; $prodname = $data->name; $amount = $addons[$addonid]["amount"]; $number = $addons[$addonid]["unitssold"]; $itemtotal += $amount; if (!$amount) $amount="0.00"; if (!$number) $number="0"; $amount = formatCurrency($amount); $reportdata["tablevalues"][] = array($prodname,$number,$amount); $prevgroup = $group; } $itemtotal += $addons[0]["amount"]; $number = $addons[0]["unitssold"]; $amount = $addons[0]["amount"]; if (!$amount) $amount="0.00"; if (!$number) $number="0"; $reportdata["tablevalues"][] = array('Miscellaneous Custom Addons',$number,formatCurrency($amount)); $total += $itemtotal; $reportdata["tablevalues"][] = array('','<strong>Sub-Total</strong>','<strong>'.formatCurrency($itemtotal).'</strong>'); $chartdata['rows'][] = array('c'=>array(array('v'=>"Addons"),array('v'=>$itemtotal,'f'=>formatCurrency($itemtotal)))); $itemtotal = 0; $reportdata["tablevalues"][] = array("**<strong>Miscellaneous</strong>"); $data = Capsule::table('tblinvoiceitems') ->join('tblinvoices', 'tblinvoices.id', '=', 'tblinvoiceitems.invoiceid') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->whereBetween( 'tblinvoices.datepaid', [ $dateRange->startOfYear()->toDateTimeString(), $dateRange->endOfYear()->toDateTimeString(), ] ) ->where('tblinvoiceitems.type', 'Item') ->where('tblclients.currency', $currencyid) ->first( [ Capsule::raw('COUNT(*) as number'), Capsule::raw('SUM(tblinvoiceitems.amount) as amount') ] ); $itemtotal += $data->amount; $number = $data->number; $amount = $data->amount; if (!$amount) $amount="0.00"; if (!$number) $number="0"; $reportdata["tablevalues"][] = array('Billable Items',$number,formatCurrency($amount)); $data = Capsule::table('tblinvoiceitems') ->join('tblinvoices', 'tblinvoices.id', '=', 'tblinvoiceitems.invoiceid') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->whereBetween( 'tblinvoices.datepaid', [ $dateRange->startOfYear()->toDateTimeString(), $dateRange->endOfYear()->toDateTimeString(), ] ) ->where('tblinvoiceitems.type', '') ->where('tblclients.currency', $currencyid) ->first( [ Capsule::raw('COUNT(*) as number'), Capsule::raw('SUM(tblinvoiceitems.amount) as amount') ] ); $itemtotal += $data->amount; $number = $data->number; $amount = $data->amount; $reportdata["tablevalues"][] = array('Custom Invoice Line Items',$number,formatCurrency($amount)); $total += $itemtotal; $reportdata["tablevalues"][] = array('','<strong>Sub-Total</strong>','<strong>'.formatCurrency($itemtotal).'</strong>'); $chartdata['rows'][] = array('c'=>array(array('v'=>"Miscellaneous"),array('v'=>$itemtotal,'f'=>formatCurrency($itemtotal)))); $total = formatCurrency($total); $chartdata['cols'][] = array('label'=>'Days Range','type'=>'string'); $chartdata['cols'][] = array('label'=>'Value','type'=>'number'); $args = array(); $args['legendpos'] = 'right'; $reportdata["footertext"] = $chart->drawChart('Pie',$chartdata,$args,'300px'); $reportdata["yearspagination"] = true;
  45. 1 point
    <?php use \WHMCS\Module\GatewaySetting; $setting = GatewaySetting::where('gateway', '=', '{gatewayname}')->where('setting', '=', '{settingname}')->first(); var_dump($setting->value); // Unencrypted value $setting->value = 'THIS WILL BE ENCRYPTED IN THE DATABASE'; // This will be encrypted before saving to the DB $setting->save();
  46. 1 point
    Hi steven99, I did that, the IP is listed, also I set up access key as described in the documentation: https://developers.whmcs.com/api/access-control/ by doing that I could avoid whitelisting of every IP that would access the server, regardless of those steps Im continuing to get this error. Also I'm using WHMCS v7.7 and PHP 7.2.14
  47. 1 point
    Hello, I am trying to access the API of my whmcs installation with postman. I am able to access it with PHP, but not with Postman using the same parameters. Could anyone advise me on this one? I receive the following message: result=error;message=Authentication Failed The whmcs installation is running on a cpanel server.
  48. 1 point
    <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $navItem = $primaryNavbar->addChild('Open Ticket'); if (is_null($navItem)) { return; } $navItem->setUri('https://www.example.com') ->setOrder(100); ; }); add_hook("ClientAreaPrimaryNavbar"); ?> No it was the getchild i thought you was trying to change the wrong one this one adds the open ticket to logged out
  49. 1 point
    If life were so easy there would be nothing here to learn This approach requires you to enter product group IDs for specific products. For example, if you want to show that notice of yours to users with web hosting packages and web design services + domain renewals, you need to enter GID numbers for those product groups. Domains are triggered directly. So, in this example your notice will be added to every invoice email containing domain renewals or products nested inside product groups with IDs 3, 9 and 14... Place this at the top of your invoice email template: {foreach key=num from=$invoice_items item=invoiceitem} {if $invoiceitem.type eq "Hosting"} {php} // ENTER PRODUCT GROUP IDs YOU WANT TO TRIGGER THE ALERT $productsGroups = Array("3", "9", "14"); $relid = $this->_tpl_vars['invoiceitem']['relid']; $join = "tblproducts ON tblproducts.id=tblhosting.packageid"; $select = select_query("tblhosting","tblproducts.gid",array("tblhosting.id"=>$relid),'gid','ASC','1',$join); $data = mysql_fetch_array($select); if (in_array($data[0], $productsGroups)) $this->_tpl_vars['trigger'] = 1; {/php} {/if} {/foreach} Place this where you want to your notice to appear... {if $trigger eq "1" or $invoiceitem.type eq "Domain"} Important! If your payment is not received by {$invoice_date_due}, your account will automatically be suspended. There is a $75 non-refundable fee to re-instate your account and restore your files. {/if}
  50. 1 point
    Hi, Please open a ticket about this issue and I'll take a look. I'll need your ftp details so I can enable error outputting and then attempt an order. Matt
×
×
  • 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