kingsleymensah Posted February 13, 2019 Share Posted February 13, 2019 i'm a web developer and i have created one account with all the websites i manage there...now is there a way to generate and send an invoice to one of those clients anytime without creating an account for them? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted February 14, 2019 Share Posted February 14, 2019 Of course yes but... why? 🙄 0 Quote Link to comment Share on other sites More sharing options...
kingsleymensah Posted February 14, 2019 Author Share Posted February 14, 2019 (edited) 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 February 14, 2019 by kingsleymensah 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted February 14, 2019 Share Posted February 14, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted February 14, 2019 Share Posted February 14, 2019 19 minutes ago, steven99 said: Uh, how without an account for the invoice to be tied to? Reinventing the wheel. Create my_clients table to store client details (firstname, lastname, companyname, email, state, country, customfields...) Develop a new page from which you can add, edit, delete clients stored in my_clients and start issuing invoices Create my_refids table to store reference numbers to JOIN customers and invoices Begin by selecting the customer you want to invoice (e.g. #5 - Silvio Berlusconi) 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 Repeat the same process to populate tblinvoiceitems based on tblinvoiceitems.invoiceid = $invoiceid (let's suppose that $invoiceid is equal to #1250) INSERT INTO my_refids (invoiceid, clientid) VALUES (1250, 5) require '/vendor/phpmailer/phpmailer/PHPMailerAutoload.php' new \PHPMailer 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) All Smarty variables ({$client_name}, {$invoice_num}, {$invoice_link}...) must be replaced with the effective values using additional queries and several str_replace 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 🤮 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted February 14, 2019 Share Posted February 14, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
kingsleymensah Posted February 15, 2019 Author Share Posted February 15, 2019 okk guys, then i i think i just have to create accounts for each just for simplicity sake 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.