Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Kian last won the day on January 15

Kian had the most liked content!

Community Reputation

182 Excellent

About Kian

  • Rank
    Senior Member

Recent Profile Visitors

7,265 profile views
  1. Kian

    Cannot put decimal prices

    Hi, Setup > Payments > Currencies. Edit your currency and focus on Format dropdown. Make sure the last item (1,234 - no decimals) is not selected.
  2. Iterate over your array and perform AddClient.
  3. Kian

    Rewrite pricing system

    Where you need that? Cart? Invoice PDF? Back-end? Front-end?
  4. Kian

    I propose a tax-free world

    From my experience 99.99% of times PA refuses to pay and rejects the electronic invoice. Split Payment exists for a reason. Here is a very extreme example: Italy: «I need to rent a datacenter for one of my universities» You: «Sure, pay me 1.220.000 euro (1.000.000 + 220.000 VAT)» Italy: «Done» You: «Ops 🙁 my company is in bankruptcy. I'm out of business. I'm so unlucky!» Italy: «I'm going to kill you!» You: «You can't kill me, I'm an LTD! 😎» Italy: «Damn it» Public treasury: «Emh... what about my 220.000 euro? 😡» You: «Bankruptcy» Public treasury: «How dare you...» You: «Bankruptcy» Public treasury: «I know where you live...» Public treasury: «BANKRUPTCY EVERYWHERE» Italy: «Hey, Public treasury could you borrow me 1.220.000 euro?» Public treasury: «Okay 😑» Italy: «I need to rent a datacenter for one of my universities» You: «Do you remember me? Let's do this again!» Split Payment exists to avoid that Public Administrations pay VAT to a "man in the middle". You won't get any chance to refund VAT. Yes, but it works because I fixed the whole thing (totals before the invoice is issued, the invoice itself and credit usage). You can't get it working just by creating the correct invoice on an external software. There's a lot to do both BEFORE and AFTER invoice issuing.
  5. Kian

    I propose a tax-free world

    I wish it was like this but its not. Let's say that you receive a payment for a VPS that costs 100 euro + 22% VAT from the following customer: Italian Public Administration Split Payment WHMCS doesn't know anything about cross out sentences. As result you forced your customer to pay 22 euro for VAT that was not due to Split Payment. Here are the consequences: You charged 122 euro instead of 100 You issued an electronic invoice of 100 + 22% with Split Payment Your customer (Public Administration) paid 22% to Revenue Agency and 22% to your company At the end of the day the customer paid 144 euro instead of 122 and you stole 22 euro not from me or from my grandma but from State. What's the point of issuing the invoice correctly on a third-party platform when this mess happened? You'll need to refund 22 euro issuing a credit note followed by an electronic credit note that I can hardly imagine. But I can imagine a lot of unhappy Public Administrations, state-owned companies and corporations. Here is another example. In WHMCS Add Funds invoices are something special. They're VAT-free for no damn reason. In most EU countries (but I'd say that it's the same everywhere!) you are not allowed to issue an invoice without VAT unless there's a valid reason (eg. VIES, extra-EU, Split Payment, credit usage, special tax regime...). The fact that you're adding funds doesn't make it special so here's the thing. A customer uploads 100 euro of credit and on my third-party platform I issue the correct invoice: Subtotal 81.97 euro Tax (22%) 18.03 euro Total 100 euro In the meantime on WHMCS the customer didn't pay VAT. Here are the consequences: In 2020 WHMCS creates 18.03 euro of money out of nowhere Toc toc... hello Mr. White I'm the Revenue Agency. We need to talk Bonus distaster 1 🍬 In 2022 VAT raises from 22% to 23% Payment received in 2020 I used 50% of 18.03 euro in 2021 with 22% VAT I spend the rest in in 2022 wih 23% VAT Bonus disaster 2 🍬 In Italy you're not allowed to postpone invoicing later than 12 days (if you have electronic invoicing) or 1 month for other countries (generally). Here we have 3 years of delay. If you are italian it means that you're going to pay a fine of 28 euro for each invoice if you report yourself to Revenue Agency or 250 euro if you don't say anything... for an invoice of 81.97 euro. Cool. Go figure out how to fix this mess. I stop here but I cloud go on for days. Sadly not 🙁 as you can see from my first example we've two problems here: issue invoice correctly and charge the right amounts to end-customers. Having perfect invoices on an external system doesn't fix the problem with wrong amounts charged to customers. I remember India and Tunisia but I bet that there are more countries. I can't determine who is using it. Frankly I don't even know if it's true that they really need to use revenue stamps but customers asked to "unlock" this feature and I don't ask question. Italy and EU are enough for me. I don't need to find new problems.
  6. Kian

    I propose a tax-free world

    It's used also in other countries 😪 That's why last year I had to make it activable by companies from any country. End-clients would kill you. People open PayPal dispute and threaten you for much less. It makes sense but it would require 2000 action hooks 🤣 I'm shy 😁
  7. An action hook would be boring as hell. In AdminAreaHeaderOutput with jQuery first you need to retreive an array that contains the ID of all invoices listed in the table. Once you have the array run a query to select invoices that have your "placeholder" in tblinvoices.notes like follows: SELECT id FROM tblinvoices WHERE id IN ($yourArray) AND notes LIKE '%yourPlaceholder% Now that you know what are the invoices "On hold", run another jQuery to iterate such records and place the "On hold" label using ID in selectors.
  8. Happy accountant? They have no feelings and exist to ruin our lifes. For an accountant that doesn't like Cancelled invoices there's one that doesn't like Paid ones. 1000 customers, 1000 accountants, 90000 different points of view. Anyway back on topic Cancelled invoices are fine and even necessary in case you can't issue credit notes.
  9. The error is referring to a Client Custom Field that is named exactly Country and set as required (Setup > Custom Client Field). It's not the country field of WHMCS. That said, you have 3 options: Specify Country custom field in your API call Make it optional Delete it
  10. Kian


    It's an action hook, you can't use it in tpl files. Create a php file in includes/hooks and name it as you prefer (eg. overrideIntoDNS.php) then copy the script in the file and save.
  11. Kian

    i am want to change intodns.com to other

    Today someone else asked the same question. I provided the answer here. The script is the following: <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ var url = $('input[name="domain"]').val(); $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://example.com/hello.php?domain='+ url +'" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); Here's the output:
  12. Kian

    I propose a tax-free world

    What's the point of syncing WHMCS invoices with external accounting softwares when the real problem is that WHMCS issues invoices that are wrong? I mean wrong amounts, tax calculation, rounding, refund and gigantic lacks of billing concepts. I'll give you 6 examples taken from my book of examples: WHMCS issues an invoice where VAT is required but missing since it doesn't understand that AddFunds invoices must be taxed. Instead of 122 euro (100 + 22 VAT) the client paid 100 and I have an invoice that makes no sense. Who's gonna pay 22 euro? Ghostbusters! 👻 WHMCS issues an invoice with VAT but it was not necessary since it doesn't understand the concept of Split Payment. If you happen to have Public Administrations as clients it's game over for you State-owned companies... ouch Credit notes... ouch Refunds that make sense Tax stamp
  13. Send Mass Mail Note down every email that gives "Sending Failed" in a PHP array In AfterCronJob iterate over the array to move the "Sending Failed" customers in a Client Group named "dead people" Make sure that "dead people" Client Group is NOT selected when you send new Mass Mail Repeat the process 2 times then stop because I'm too lazy to continue and find a better solution Keep playing with invoices 😪
  14. Kian


    If I understoon you correctly... <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ var url = $('input[name="domain"]').val(); $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://example.com/hello.php?domain='+ url +'" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); The rainbow cat will open example.com/hello.php?domain={THE_DOMAIN_WRITTEN_IN_THE_INPUT}. p.s. If you are a real man, leave the rainbow cat in production! 😎
  15. Kian


    <?php add_hook('AdminAreaHeaderOutput', 1, function($vars) { if ($vars['filename'] == 'clientsservices') { $output .= <<<HTML <script type="text/javascript"> $(document).ready(function(){ $('input[name="domain"] + div').children('ul').eq(0).append('<li><a href="https://www.youtube.com/watch?v=QH2-TGUlwu4" target="_blank"><img src="https://katamaze.com/templates/kata/img/stuff/nyan-cat.png" style="height: 27px;width: 180px;"></a></li>'); }); </script> HTML; return $output; } }); Here is the output.

Important Information

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