Jump to content

All Activity

This stream auto-updates

  1. Today
  2. Yesterday
  3. Here are some screenshots. One shows view of client record invoices (there are only two invoices, and none are unpaid) The other reflects what was captured from the declared/captured values (25 for num of invoices is from numreturned).
  4. @towhiddex The one thing you missed is that I did pass in the $clientid (params userid assignment). The client in question had no Unpaid invoices (as defined in the postdata array. When I tested similar using postman request to our production (there are limits in our dev) it returned anticipated results of 0 for totalresults and numreturned which is what I am anticipating. I am not concerned about limitnum because the default return of 25 would be fine. All I need to evaluate is whether it is 0 or >=1.
  5. Even with setting the $clientid as integer and using that in the API request, it still acts like no clientid reference is supplied. What am I missing.
  6. It is acting like it is not recognizing the client id and returning for all client invoices matching unpaid. not sure why. Will be declaring $clientid as int and then passing it in. We'll see. $client = $vars['params']['userid']; // triggered from premodulerenew hook $clientid = (int) $client; The module params documentation indicates userid is Id from tblclients.id, which indicates in schema it is already an int. The curious thing is, I pulled same code from another hook that used same localAPI for GetInvoices and it had no issues at all.
  7. your API call isn’t using the filter array you think it is, and you’re reading the wrong field from the response. 1103 = totalresults for all unpaid invoices (because filters weren’t applied). 25 = numreturned default page size, with no limitnum specified. $clientid = (int) $vars['params']['userid']; $command = 'GetInvoices'; $postData = array( 'userid' => $clientid, 'status' => 'Unpaid', 'limitstart' => 0, 'limitnum' => 3000, ); $getClientInvoices = localAPI($command, $postData); // , $adminuser if needed $invoicecount = 0; if ($getClientInvoices['result'] === 'success') { $invoicecount = (int) $getClientInvoices['totalresults']; } if ($invoicecount >= 1) { logActivity( 'Service renewal will be aborted for client ' . $clientid . '. It is not qualified because it has ' . $invoicecount . ' unpaid invoices - by hook_send_renewal_notice_toadmin...' ); }
  8. I am using the following localAPI request in a hook (excerpt) to determine number of invoices matching the request (e.g. # unpaid for a defined client). $clientid = $vars['params']['userid']; // triggered from premodulerenew hook $invoicecount = 1; $command = 'GetInvoices'; $values = array( 'userid' => $clientid, 'status' => 'Unpaid' ); $getClientInvoices = localAPI($command, $postData); if ($getClientInvoices['result'] == 'success') { $invoicecount = $getClientInvoices['numreturned']; } if ($invoicecount >= 1) { logActivity('Service renewal will be aborted for client ' . $clientid . '. It is not qualified because it has ' . $invoicecount . ' unpaid invoices - by hook_send_renewal_notice_toadmin...'); } The $clientid listed in the logactivity matches the clientid passed to the LocalAPI ('userid' => $clientid), but it first returned over a 1103 as totalresult in the response. So, I thought I would switch to numreturned in the response, and it went to 25 (which is default for number to return) 1103 from $invoicecount from response.totalresults Service renewal will be aborted for client 585. It is not qualified because it has 1103 unpaid invoices - by hook_send_renewal_notice_toadmin... 25 from $invoicecount using response.numreturned Service renewal will be aborted for client 585. It is not qualified because it has 25 unpaid invoices - by hook_send_renewal_notice_toadmin... 585 is the correct clientid as reported in the logactivity so how in the world is it reporting 1103 and 25? There only 2 invoices recorded for the client and only 1 is unpaid.
  9. Last week
  10. Sorry, but sounds more like a personal (shortage) issue to me.
  11. Hi @towhiddex Thank you for taking your time with me. I have aplied this hook, I tried to create imediately new billable item on next cron, but no invoice was generated, not sure why yet..but let me test it more and will post here.
  12. Strange bug indeed… it happened to me too!!
  13. You may also want to check with WHMCS, since your license isn't active: https://www.whmcs.com/members/verifydomain.php/verifydomain.php
  14. Is there any update on when a beta or release candidate for version 9.0 will be available? Should we expect it within the next few days or rather in the coming weeks?
  15. Hi, Special Black Friday One-Time Price Offer for Our WHMCS Members! We have 218 professionally made tutorial videos which can be directly import to your WHMCS knowledge-base. Fill your WHMCS Knowledge-base with helpful videos for your customers. Big companies have marketers and content creation / video making team, small companies cannot afford to make hundreds of video tutorials on various hosting software / control panels. We are providing solution for you. Buy Video Tutorials for your WHMCS Knowledgebase - Just $99 (One-Time Price) Coupon Code: BlackFriday25 Features of DemoTiger Videos: Purchase video tutorials for your Knowledge-base, and stand different from other hosting companies. Helpful for boosting your website SEO/Ranking. Used by various hosting companies. Up-to date. Multilingual - Available in English and Dutch. Buy only specific video series(English) cPanel Series - New Series Plesk Obsidian Series DirectAdmin Series SolusVM 1 Series Virtualizor Series WordPress Series - New Series Thunderbird Email Series Outlook 2019 Email Series Filezilla Client - Windows FTP Series If you wish to compete with bigger companies having lots of video tutorials for their customers, then it is your chance to advertise and increase your presence by buying high-quality video tutorials from DemoTiger. Supported Platforms/Billing Software: - Any version of WHMCS is supported. PreMadeKB Offer Details PreMadeKB Special Offer - 30% Discount. Coupon Code: KBBlackFriday Buy PreMadeKB for WHMCS Knowledgebase - 30% Discount for Black Friday! Note: Discounted price will be shown after you click Continue. Thanks.
  16. For the record, posting your entire server path to the cron file (or any internal files, for that matter) should be avoided.
  17. I remember we had the same issue when using /opt/cpanel/ea-php81/root/usr/bin/php. It wouldn't work on one WHMCS installation but would work on others. We changed it to /usr/local/bin/ea-php81 and it started working.
  18. That's normally caused by a supporting file being directly accessed, and doesn't look like a block to me. If you're using a 3rd party theme, try with a standard one. I've never seen what a "you didn't pay" block from WHMCS looks like, but would have assumed it would fail with something more meaningful than that, and IIRC, it only blocks admin access, not client facing pages.
  19. Hello, It's very easy to resolve with Hook, just do Create a hook file at: whmcs/includes/hooks/invoice-lineitem-date.php <?php use Illuminate\Database\Capsule\Manager as Capsule; use Carbon\Carbon; add_hook('InvoiceCreationPreEmail', 1, function ($vars) { $invoiceId = (int) $vars['invoiceid']; $inv = Capsule::table('tblinvoices')->where('id', $invoiceId)->first(); if (!$inv) { return; } $dateText = Carbon::parse($inv->date)->format('d-m-Y'); $items = Capsule::table('tblinvoiceitems') ->where('invoiceid', $invoiceId) ->get(); foreach ($items as $item) { $isBillableItem = ($item->type === 'Item'); if (!$isBillableItem) { continue; } $newDescription = $item->description; if (strpos($newDescription, '{DAY}') !== false || strpos($newDescription, '{MONTH}') !== false || strpos($newDescription, '{YEAR}') !== false) { $newDescription = preg_replace( '/\{DAY\}\s*-\s*\{MONTH\}\s*-\s*\{YEAR\}/i', $dateText, $newDescription ); } else { $newDescription .= " ({$dateText})"; } Capsule::table('tblinvoiceitems') ->where('id', $item->id) ->update(['description' => $newDescription]); } });
  20. Hello, I have searched on the community and did not find yet a solution, also have tried my self and not successfully. I want to invoice in a daily basis a custon product, and realizing that billable items do that, which is great! But the issue is that I want to add automatic date on each of these new invoice that will be created by billable itens. have tried so far this.. but using {DAY}-{MONTH}-{YEAR} on the description will not display it as 03-12-2025 I suspect WHMCS accepts HTML code or smarty code templates that will do that, but can no do it at this. If anyone can advice or help. I got this, bu I need it to display actually date the invoice was generated, so evey new invoice to display actual date on the desciption. This is what I look for... Thank you!!!
  21. It worked earlier and all my host said is 'You could ask WHMCS support to verify if they have your domain blacklisted, and if so to get the blacklist removed. Only they can do that so you would have to ask them. Other than that maybe some WHMCS core files are missing but your WHMCS installation seemed complete to me. Do let us know if you have any further questions or concerns.'
  22. Hi, I guess if you contact the license provider, they should be able to rectify the issue. You are trying from a new WHMCS installation or it was working earlier?
  23. When anyone tries to access my WHMCS area all they get is 'This file cannot be accessed directly' i have checked and double checked and all files/folders are still in place and no IP blocks in place. I got my WHMCS licence from my webhost as part of my hosting plan and this always worked. then when i check my domain at https://www.whmcs.com/members/verifydomain.php/verifydomain.php i just get ,This domain is not authorized to be using WHMCS.
  24. Its solved. i used -F flag in cron. i removed it and now its working correctly.
  1. Load more activity
×
×
  • 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