Jump to content

is there a way to generate an invoice for a client without creating an account for him?


kingsleymensah

Recommended Posts

i tried to do that but it created client account in whmcs before sending the invoice ....i want to be able to send to clients who are not registered in whmcs.. some of them sometimes demand for the invoice before they manually send me money

since i manage their hosting, i created one account in WHMCS with my email......can someone tell me how to do that? 

Edited by kingsleymensah
Link to comment
Share on other sites

5 hours ago, Kian said:

Of course yes but... why? 🙄

Uh, how without an account for the invoice to be tied to? 

@kingsleymensah ,  IMO it would be better for them to have an account, even if you create it with their name and email address as the only info.  That way records are kept organized and easy for all parties to see or at least for your side if you don't allow them access to the system.

Link to comment
Share on other sites

19 minutes ago, steven99 said:

Uh, how without an account for the invoice to be tied to? 

Reinventing the wheel.

  1. Create my_clients table to store client details (firstname, lastname, companyname, email, state, country, customfields...)
  2. Develop a new page from which you can add, edit, delete clients stored in my_clients and start issuing invoices
  3. Create my_refids table to store reference numbers to JOIN customers and invoices
  4. Begin by selecting the customer you want to invoice (e.g. #5 - Silvio Berlusconi)
  5. Create the invoice interacting directly with database. INSERT INTO tblinvoices a lot of stuff using 0 (zero) as UserID since it cannot be NULL and store lastInsertId() in $invoiceid variable
  6. Repeat the same process to populate tblinvoiceitems based on tblinvoiceitems.invoiceid = $invoiceid (let's suppose that $invoiceid is equal to #1250)
  7. INSERT INTO my_refids (invoiceid, clientid) VALUES (1250, 5)
  8. require '/vendor/phpmailer/phpmailer/PHPMailerAutoload.php'
  9. new \PHPMailer
  10. SELECT subject, message FROM tblemailtemplates WHERE name = "Invoice Created" LIMIT 1. We need it to rebuild the Invoice Created email of WHMCS (multi-language requires more efforts)
  11. All Smarty variables ({$client_name}, {$invoice_num}, {$invoice_link}...) must be replaced with the effective values using additional queries and several str_replace
  12. Send it to the email address of #5 Silvio Berlusconi

I stop here. There are tens of other steps to consider but it's doable. I know that it seems messy and frustrating but nothing is impossible. You should ask yourself if it's worth it. Probably not 🤮

Link to comment
Share on other sites

And that's like using a hammer to hammer in a screw.  It will work but you'll cause issues probably.   And your step one is still registering an account basically but outside of whmcs.   So yeah IMO not worth reinventing the wheel unless you are going full bore and doing your own billing system. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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