Mark Donne Posted August 28, 2008 Share Posted August 28, 2008 Hi, We recently went live with WHMCS after nearly 12 months of planning and so far so good except for one small problem which we are hoping we can resolve. One of the services we provide is broadband and we use WHMCS to send out the monthly invoices. We have created a custom Product Field to store the Phone Number that the broadband relates to for each client and we had hoped to get this information onto the invoice. The ideal scenario would be a new line in the invoice details which would appear under the product line showing something like " - Field Name : Field Value" with a zero Amount. A tick box could be added to the Custom Fields area in Product/Services to control whether this field was displayed on the invoice or not. Is this a viable New feature Request or is there some workaround that I am missing. I know that there is a merge field called [ProductCustom-FieldName] but I don't believe I can get this to display in the invoice line can I? Thanks for any help. Mark Donne HOST100 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted August 28, 2008 Share Posted August 28, 2008 you can display anything you like on any line my editting the pdf/tpl files A tick box could be added to the Custom Fields area in Product/Services to control whether this field was displayed on the invoice or not. why not just test the field value and output it is not blank ? 0 Quote Link to comment Share on other sites More sharing options...
Mark Donne Posted August 28, 2008 Author Share Posted August 28, 2008 So something like this you think? {foreach key=num item=invoiceitem from=$invoiceitems} <tr> <td>{$invoiceitem.description}{if $invoiceitem.taxed eq "true"} *{/if}</td> <td>{$currencysymbol}{$invoiceitem.amount} {$currency}</td> </tr> {if $ProductCustom-ADSL Telephone Number} <tr> <td colspan="2">{$ProductCustom-ADSL Telephone Number}</td> </tr> {/if} {/foreach} 0 Quote Link to comment Share on other sites More sharing options...
Mark Donne Posted August 28, 2008 Author Share Posted August 28, 2008 That's not the answer. That is the correct syntax to use if it was a client custom field. For a product custom field, you use [ProductCustom-My Field] However, product custom fields only work in product related email templates. They won't work in invoice related templates. Matt Found this on another post. Not sure what to do now! 0 Quote Link to comment Share on other sites More sharing options...
Mark Donne Posted August 28, 2008 Author Share Posted August 28, 2008 So back to my original post, I'm gonna post it in the Feature Request section 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 28, 2008 WHMCS CEO Share Posted August 28, 2008 It's possible to show the custom field in the client area invoice and PDF invoice using some code similar to that above. Matt 0 Quote Link to comment Share on other sites More sharing options...
freedombi Posted August 28, 2008 Share Posted August 28, 2008 I've just used the domain field for phone numbers. 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.