stormy Posted February 25, 2010 Share Posted February 25, 2010 Maybe this has been posted elsewhere, but I couldn't find it. Amongst the legal requirements for invoices in my country, a VAT number for the customer must be displayed. You need to edit viewinvoice.tpl and invoicepdf.tpl so you can include it. Here's what I did, assuming the VAT number is a custom field and it's the first one. If your custom field has another number, change the code accordingly. viewinvoice.tpl After: {$clientsdetails.country}<br /> add: VAT #: {$clientsdetails.customfields1} Easy enough! Now for: invoicepdf.tpl After: $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); add: $pdf->Cell(0,4,"VAT #: ".$clientsdetails["customfields1"],0,1,'L'); It's the same thing but with different syntax. I hope this is useful for someone! 0 Quote Link to comment Share on other sites More sharing options...
vchosting Posted February 26, 2010 Share Posted February 26, 2010 I have added the vat field in custom fields and the above works fine. However the vat number field can be updated in the members my details section which is also fine. The problem I have us that it is not a field that is requested upon signing up or registering on the site. How do I make this field appear on the register.php screen so it is obtained at that point. 0 Quote Link to comment Share on other sites More sharing options...
JofleyUK Posted February 27, 2010 Share Posted February 27, 2010 in the Custom Field setup check the "Show on order form" and it will be collected upon signup. 0 Quote Link to comment Share on other sites More sharing options...
vchosting Posted February 27, 2010 Share Posted February 27, 2010 Thanks - That has worked great. 0 Quote Link to comment Share on other sites More sharing options...
djseamus Posted February 9, 2011 Share Posted February 9, 2011 If your custom field has another number, change the code accordingly. Which part of the text string indicates the field number? 0 Quote Link to comment Share on other sites More sharing options...
stormy Posted February 9, 2011 Author Share Posted February 9, 2011 customfields1 in my case, since I only have one custom field. Some trial and error will get youthe right one. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted February 10, 2011 WHMCS CEO Share Posted February 10, 2011 Thanks for posting the tutorial. The steps for doing this can also be found in our docs @ http://docs.whmcs.com/PDF_Invoice#Displaying_Custom_Fields 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.