erock4 Posted October 18, 2019 Share Posted October 18, 2019 Is it possible to create an "Add Funds" invoice for a client without sending them an email? I want to incentivize my clients to pre-fund their account by giving them a discount. So for example, they could add $100 worth of credit to their account by only paying $90. I'd also be interested in doing this with the external API, but I'm not sure how to generate an Add Funds invoice with the API. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 21, 2019 Share Posted October 21, 2019 Think twice. Basically you are creating money from nothing. I pay 90 (taxed) and get 100. Before you start coding give a call to your accountant to make sure everything is fine. -1 Quote Link to comment Share on other sites More sharing options...
erock4 Posted October 21, 2019 Author Share Posted October 21, 2019 4 hours ago, Kian said: Think twice. Basically you are creating money from nothing. I pay 90 (taxed) and get 100. Before you start coding give a call to your accountant to make sure everything is fine. This does not answer my question. There's nothing wrong with offering a discount on an Add Funds invoice vs a discount on a product or services invoice. I can do this now within WHMCS; after I make an Add Funds invoice, I simply add another line item with a negative value for the discount and it works as I expect. The problem is that I can't seem to stop the initial Add Funds invoice from automatically being sent to my client before I can add the discount. This is why I was interested in creating the Add Funds invoice with the external API for example. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted October 21, 2019 Share Posted October 21, 2019 I do know that I didn't answer to your question. I just wanted to be helpful letting you know that this kind of change could cause billing mistakes. Over the years it happened with a lot of customers therefore before investing 15 minutes of my time giving you the snippet, I wanted to make sure that you were doing it in the right way. I don't like to share code that potentially could cause billing nightmares - you didn't mention you were adding another line with a negative amount. On 10/18/2019 at 7:09 PM, erock4 said: Is it possible to create an "Add Funds" invoice for a client without sending them an email? Yes: EmailPreSend (abortsend = true) UpdateInvoice (add a new line with negative newitemamount) SendEmail (re-send the previously suppressed email) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 21, 2019 Share Posted October 21, 2019 On 18/10/2019 at 18:09, erock4 said: I want to incentivize my clients to pre-fund their account by giving them a discount. So for example, they could add $100 worth of credit to their account by only paying $90. there are multiple commercial addons that can do that, e.g one would be Bonus For Funds - though i'm not sure if the bonus is automated or if you have to manually decide when to add it... the developers will know, so they'd be the ones to ask on that. 13 minutes ago, erock4 said: I can do this now within WHMCS; after I make an Add Funds invoice, I simply add another line item with a negative value for the discount and it works as I expect. The problem is that I can't seem to stop the initial Add Funds invoice from automatically being sent to my client before I can add the discount. This is why I was interested in creating the Add Funds invoice with the external API for example. there was a hook that was posted a couple of years ago that prevented the Add Funds emails from being delivered to the client... I suppose in your case you could modify the hook to disable sending only if it's add funds AND there isn't a discount/negative line in the same invoice (if you're wanting to manually edit the invoice after creation)... 0 Quote Link to comment Share on other sites More sharing options...
zitu4life Posted October 21, 2019 Share Posted October 21, 2019 2 hours ago, brian! said: there was a hook that was posted a couple of years ago that prevented the Add Funds emails from being delivered to the client... ohhh I was looking for some hook like this... Sometimes I have a client (let´s say VIP client), and also this client ask to add funds by phone, as he do not use client area, so I have to add it on Admin side, and since it is client from long years, he will pay monthly, so all add funds requested should be add by admin side . I usually create manually invoice and add invoice line Add funds, because if i just create Add funds on admin it will send invoice on the same moment to a client, and i want to choose when to send (end of month). If i prevent add funds to be sent , sounds great. Will give that hook a try. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.