jr.zaghetto Posted June 20, 2013 Share Posted June 20, 2013 Hello, When my WHMCS generates an invoice it is generating with the person's name, but I would like it to appear the company name (if any). For example a new user registers, and uses the documents of his company, but if he puts his name and company when the invoice is generated instead of going on behalf of the company, appears with his name. Do you know any way that I use to show the company name (if any) on the invoice instead of the name. Thank you, Marcos Antonio 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 20, 2013 Share Posted June 20, 2013 if you mean the pdf invoice, you will need to edit the invoicepdf.tpl template in your template directory. inside invoicepdf.tpl, there should be lines similar to below... if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->Cell(0,4,$_LANG["invoicesattn"].": ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); this should display company name (if it exists) and then on the line below: ATTN: firstname lastname to get rid of the above line and have the invoice show the company name (or just firstname lastname if no company name exists), change the code to the following... if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); } else { $pdf->Cell(0,4,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); 0 Quote Link to comment Share on other sites More sharing options...
jr.zaghetto Posted June 20, 2013 Author Share Posted June 20, 2013 Hello brian!, I was rooting around here and I ended up in what would. Either way, you helped me a lot. Thank you! 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.