Jump to content

Invoice generated when adding funds


Gazza

Recommended Posts

Invoice generated when adding funds to account

I have this issue and getting customer complains and confusion

Invoices are generated when adding funds to accounts during the add funds process, these in turn send an email to the customer telling them a invoice has been created

I need to stop the invoice being generated and just a confirmation after payment that credit has been added to there account

Any ideas or am I overlooking a option I have not configured.

Thank you

Link to comment
Share on other sites

let me explain what I mean

when they go into there account to add funds, use add funds option and complete form with amount to be added and payment option (paypal)

click add funds and takes you to paypal gateway to pay.

before you even get as far as paying by paypal an invoice is generated and emailed to the account holders email address, with a customer unpaid invoice

then once funds have been added they get a second email to confirm payment.

 

The first email is not needed, they are adding funds directly through there account/payment gateway so no email/invoice needs to be sent out, billing the customer again.

 

here is a similar thread to the issues that I am now receiving complains about

https://forum.whmcs.com/showthread.php?92851-Why-another-invoice-for-adding-funds-and-mass-pay

Edited by Gazza
Link to comment
Share on other sites

let me explain what I mean

when they go into there account to add funds, use add funds option and complete form with amount to be added and payment option (paypal)

click add funds and takes you to paypal gateway to pay.

before you even get as far as paying by paypal an invoice is generated and emailed to the account holders email address, with a customer unpaid invoice

then once funds have been added they get a second email to confirm payment.

 

The first email is not needed, they are adding funds directly through there account/payment gateway so no email/invoice needs to be sent out, billing the customer again.

 

here is a similar thread to the issues that I am now receiving complains about

https://forum.whmcs.com/showthread.php?92851-Why-another-invoice-for-adding-funds-and-mass-pay

 

The invoice is automatically generated, and once the invoice is paid, the funds will appear in the clients account. We use this feature a lot, and its very popular amongst our clients.

Link to comment
Share on other sites

yes my customers use it a lot to prefund there accounts and not complaining about the option its self, its very good and well used.

I get fed up with explaining why they are getting the unpaid invoice emails each time they use the add fund option.

if it was a separate email from normal product generated invoice I would just disable the email template to stop the email being sent.

Link to comment
Share on other sites

yes my customers use it a lot to prefund there accounts and not complaining about the option its self, its very good and well used.

I get fed up with explaining why they are getting the unpaid invoice emails each time they use the add fund option.

if it was a separate email from normal product generated invoice I would just disable the email template to stop the email being sent.

the following Hook will do the trick, before "Invoice Created" email being sent, it will check if this a "Add Funds" invoice, if so it will abort sending.

 

just create new PHP file inside /includes/hooks/ directory and copy this code inside:

<?php
/**
* Prevent Invoice Created Message Sending for Add Funds
*
* @author     SENTQ <support@whmcms.com>
* @copyright  Copyright (c) SENTQ 2017
* @version    1.0
*/

if (!defined("WHMCS")){
   die("This file cannot be accessed directly");
}

use Illuminate\Database\Capsule\Manager as Capsule;

add_hook("EmailPreSend", 1, function($vars){

   if ($vars['messagename']=="Invoice Created"){

       $isAddFunds = Capsule::table("tblinvoiceitems")
       ->where("invoiceid", "=", $vars['relid'])
       ->where("type", "=", "AddFunds")
       ->count();

       if ($isAddFunds){
           return array("abortsend" => true);
       }

   }

});

Link to comment
Share on other sites

  • 5 months later...

Hello, i created the file above and named it fund_no_mail.php and added it to the 'hook' directory.

I did test it now and added some fund. The client still receive an invoice after adding some money.

 

I'm not sure if we talk about the same thing in this discussion but i do not want clients receive an invoice after adding money to their credit. (see this topic: https://forum.whmcs.com/showthread.php?130794-why-invoice-after-add-money-to-credit)

 

I hope you can help me with the right 'hook'.

Link to comment
Share on other sites

you might want to mention which version of WHMCS you are using - as that might be relevant.

 

also, it's worth noting that the hook just stops the invoice email from being sent to the client, the invoice is still created and therefore wouldn't really solve your tax office issue mentioned in the other thread.

Link to comment
Share on other sites

Hi Brian,

 

I'm running 7.1.2

You are right, this hook is not the solution for the tax office issue i mention before.

I think many other people (who have the same tax rules as i have here in the Netherlands) will have the same issue.

Can this be solve with a hook?? So, no invoice sending after adding funds?

 

Any help is much appreciated!

Emile

Link to comment
Share on other sites

Hi Brian,

 

I'm running 7.1.2

You are right, this hook is not the solution for the tax office issue i mention before.

I think many other people (who have the same tax rules as i have here in the Netherlands) will have the same issue.

Can this be solve with a hook?? So, no invoice sending after adding funds?

 

Any help is much appreciated!

Emile

this ActionHook function should prevent it from sending invoice email when the invoice is for adding funds

Link to comment
Share on other sites

I suspect the Billing Extension third-party addon might do something along those lines, though you might want to check with the developer first.

 

http://docs.katamaze.com/article/general-settings-2.html

 

Disable Add Funds invoices

 

If for some reasons you want to get rid of Add Funds invoices also because of the issues explained in Apply tax to credit paragraph, enable this option (Yes) otherwise leave it to No. When this option is enabled, the module automatically removes Add Funds invoices from the system as soon as clients send you the payment.

 

Before enabling this option, talk about it to your accountant.

the implication of the above is that the invoice is created and then later deleted... what that does for the invoice number sequence, and whether you would appear to have "missing" invoices, I don't know.

Link to comment
Share on other sites

Yes indeed, so it looks like....

That is not good indeed because of the invoice numbering....

 

What i do now until we have a solution is cancel the invoice after it is created. Then it is still there so the numbering is no issue. And then i ask client to ignore that invoice.

But it is not that professional.

Link to comment
Share on other sites

I agree that the current Add Funds system is not professional...

 

When it comes to the UK/EU tax man you have to explain any oddities in invoice numbering...

 

For Add Funds there should be NO standard invoice generated - but rather a separate "Add Funds" notification with separate numbering to the standard invoices (so the standard invoice numbering stays unaltered). Then when the client adds the funds according to the "add funds notification" they then get issued a "receipt".

 

If you look at any professional accounting package (I Use SAGE) - adding funds and issuing credit notes is very separate from general invoicing, and any online billing system should have similar features if it is to comply with accounting regulations in the EU.

Link to comment
Share on other sites

I agree that the current Add Funds system is not professional...

 

When it comes to the UK/EU tax man you have to explain any oddities in invoice numbering...

 

For Add Funds there should be NO standard invoice generated - but rather a separate "Add Funds" notification with separate numbering to the standard invoices (so the standard invoice numbering stays unaltered). Then when the client adds the funds according to the "add funds notification" they then get issued a "receipt".

 

If you look at any professional accounting package (I Use SAGE) - adding funds and issuing credit notes is very separate from general invoicing, and any online billing system should have similar features if it is to comply with accounting regulations in the EU.

 

I'm glad somebody can tell in correct English what i exactly mean... mine English is to bad :-)

In a next update of whmcs it would be great if the invoices function could be set on/off for the 'add fund'.

Any chance on that??

 

How do others solve this problem?

Link to comment
Share on other sites

I'm glad somebody can tell in correct English what i exactly mean... mine English is to bad :-)

your English is very good - and better than my Dutch! :)

 

In a next update of whmcs it would be great if the invoices function could be set on/off for the 'add fund'.

Any chance on that??

I suspect close to none... it's possible, but Add Funds has worked this way for years.... another option is submitting a feature request and waiting 4 years for it to be implemented... the second is more likely to happen than the first.

 

for them to do anything, WHMCS first have to decide that this is a problem - now granted for you, and others, it is one, but would WHMCS look at it in the same way?? WHMCS has always done some eccentric things from an accountancy point of view.

 

even if they decide that it's an issue, i'd imagine that it's the sort of thing they would leave until a major release as it could require extensive beta testing by existing users, so that means v7.3 (which is possibly months away), or v8 (which is not scheduled until next year).

 

the lesson here is that if you want a feature resolved quickly, then pay a developer to do it... that's not the way it should be, but it's just the reality of using WHMCS.

 

How do others solve this problem?

by not using the "Add Funds" feature - I treat it as one of those features (and there are a few!) that is badly implemented and causes more hassle than it's worth.

 

For Add Funds there should be NO standard invoice generated - but rather a separate "Add Funds" notification with separate numbering to the standard invoices (so the standard invoice numbering stays unaltered). Then when the client adds the funds according to the "add funds notification" they then get issued a "receipt".

hmmm... if you had to, you could almost do that purely in the templates (both web and email)... it's the sequential invoice number requirement that's the pain.

 

I mean it would be relatively simple to modify the existing email template to act as a notification email when adding funds, similarly the invoicepdf.tpl could be modified to appear as a receipt when funds are added... it's the fact that WHMCS uses the invoices table, and so autoincrements, that makes using the existing methods as awkward... I can see workarounds, but I don't like any of them.

 

If you look at any professional accounting package (I Use SAGE) - adding funds and issuing credit notes is very separate from general invoicing, and any online billing system should have similar features if it is to comply with accounting regulations in the EU.

as a fellow Sage user, I would agree with that. :idea:

 

btw - the previous hook doesn't work, I tried it yesterday.

Link to comment
Share on other sites

WHMCS's approach to accounting is rather unusual...

 

For example:

 

Let's say the last invoice issued and paid was invoice #1000 and everything is going fine so far, all invoices are sequentially numbered as they should be (now a legal requirement in MANY countries)

 

Next day a client adds £100 in funds.

 

Client now gets Add Funds invoice #1001 and pays it and gets a receipt, the client now has £100 in credit.

 

If I then do £100 worth of work for him/her a couple of days later - invoice #1002 is issued at £100, which is paid from credit automatically and receipt is issued.

(client now has 2 receipts for £100 each - so this messes up the client's account too).

 

To an accountant - and to the UK/EU tax authorities - this now looks like I have earned £200 from this client in a couple of days - when I only actually earned £100 - this is absolutely disgraceful - because this makes my earnings look MUCH bigger than they really are - and means I have some serious explaining to do to both the accountant and to the tax man... (they see 2 the paid invoices for £100 each and so they assume I earned £200 not £100)

 

Basically - under UK and EU law, WHMCS is "not fit for purpose" so I am unable to submit any information from WHMCS to my accountant or the tax man while WHMCS insists on "odd" accounting practices.

 

Instead I have to use SAGE to produce my accounts so I can ensure all invoices are sequentially numbered and all Add Funds credits are shown in SAGE as "deposit on account" - so they are NOT part of my income until I issue an invoice that uses that credit.

 

This needs fixing properly ASAP - while WHMCS is reasonably effective at invoicing - it is NOT effective for accounting purposes.

 

If WHMCS do not see this as a problem I have to wonder how they get round these issues with their own accountants and tax authorities...

Link to comment
Share on other sites

If WHMCS do not see this as a problem I have to wonder how they get round these issues with their own accountants and tax authorities...

simple - they don't enable the "Add Funds" option on their own site @ whmcs.com ! :)

BTEYeym.png

 

so it's possible they haven't ran into these issues directly because they don't use the feature themselves... that's rather telling isn't it. :roll:

 

also, I don't know which tax authority WHMCS would come under, probably both US and UK - but where they pay the tax, I have no idea.... though going from Companies House when I checked last year (don't ask!), I wouldn't expect them to be paying a lot of tax in the UK... and they're exempt from auditing in the UK too.

Link to comment
Share on other sites

Perhaps they disabled it on their own site because they DID run into this problem and simply decided to ignore it...

aahh the old ignorance and indifference debate... you can sense either occurring, at different times, with WHMCS.... indifference is definitely there on some things, and i've been around here long enough to see that it's getting worse.

 

officially, the answer is to submit a feature request... but that's been done already...

 

4 Years Old - 83 Likes - https://requests.whmcs.com/topic/credit-system-usable-in-european-union-countries

2 Years Old - 30 Votes - https://requests.whmcs.com/topic/credit-note-in-compliance-with-uk-vat-legislation

 

I could give further examples, but frankly the features requests system is a complete joke (and not a funny one either)... you could double the votes, and I doubt it would make a blind bit of difference... even if it did, it still will have taken them near 5 years to do it... I suspect HMRC would be unlikely to wait that long for you to submit a tax return!

 

it's good to know the development team are busy adding features that no one has even asked for (or removing existing features nobody asked to lose), e.g constantly asking for password in the admin area, WHMCS logo on admin emails, even their flagship feature MarketConnect was seemingly launched unfinished etc... yet important core BILLING features/improvements as above go unfixed.

 

I wish I had a good answer for you, but I can't think of a way to get a rocket up the development team to fix this... they've replied to the above request, so they are obviously aware of, but apparently apathetic to, the issue.

Link to comment
Share on other sites

Folks, i'm so happy that you both agree on the issue and explain exactly what i think. Thanks !!!

I agree too that whmcs should fix this asap !!! I'm a pretty new user so i have a new license that i pay for every month.....

 

but for the time that it is not fix..... do you think this problem could be fix with a hook????

Link to comment
Share on other sites

I'm glad somebody can tell in correct English what i exactly mean... mine English is to bad :-)

In a next update of whmcs it would be great if the invoices function could be set on/off for the 'add fund'.

Any chance on that??

 

How do others solve this problem?

 

if you want that you will need to make a request here https://requests.whmcs.com/

Link to comment
Share on other sites

I agree too that whmcs should fix this asap !!! I'm a pretty new user so i have a new license that i pay for every month.....

don't be expecting quick solutions from WHMCS... from their point of view, this isn't a bug, so it may have a low priority.

 

but for the time that it is not fix..... do you think this problem could be fix with a hook????

possibly more the job of an addon than a hook, as you're not quick tweaking an existing process, but almost starting with a new process well away from the invoices table.

 

as I said previously, the only addon that i'm aware of vaguely in this area is the Billing Extension module... but it's quite a large / expensive module (if it were me, i'd have spun off some features into separate smaller cheaper addons - but each to their own!)... also, according to the Marketplace ratings, and similar posts here in the forum, his support is seemingly not what it once was... which is a shame because if anyone knows WHMCS and EU tax rules, it would be him.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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