Currently add-ons are shown on every invoice for the product associated even if they are not purchased. Agreed they should be available as an upgrade on the back-end but with many options the invoice is cluttered with confusing garbage.
This is a very important feature, it should be options like custom fields.
David Hughes
commented
1st May 20
Hard to imagine this isn't a standard option. Would be great to see it in WHMCS so we don't have to hack the code in ourselves.
theProduct
commented
26th January 19
Any update on this?
I figure "don't show the thing the customer didn't want" was a fairly obvious feature requirement, haha
Paul Cline
commented
12th December 18
Yes, yes from me. I can't believe this issue has been outstanding for so long.
It looks REALLY unprofessional with these add ons on the invoice. Not a good look at all.
Surely something like the custom field options where you can choose where it shows up would be pretty straightforward?
Greg Williams
commented
25th November 18
Yes yes yes! This needs to be implemented as soon as possible. Invoices look terrible with line after line of items that weren't ordered. Please add this ASAP!
Swehoster
commented
23rd October 18
This is needed, Many clients get frustrated to see all options they don't buy on the invoice.
It looks cheap and unprofessional.
I tried the fixes above on WHMCS 7.6.1 but it looks like it's not working any more.
Ryan O'Dwyer
commented
4th April 17
Is there any way this can be implemented in the confirmation email? I was able to use the code above succesfully to filter the client area and the PDF but no love on the email body.
Placeholder is {$invoice_html_contents}
Can a similar regex be implemented in the email body?
John MacKenzie
commented
6th July 15
this really needs to be fixed!
tomb
commented
24th November 14
How I do leave Quantity in place?
magicalproductions
commented
22nd November 14
Not sure if the templates have changed since you posted this, but here is what I used of your modified code to make it work:
[/co] These seemed to work for me on the default when I had issues just pasting your code in there. But your code got me 95% of the way there and now I know some smarty and more php.
Stephen Schillinger
commented
10th June 14
I still REALLY think this should be built in, but I have created some code we can add to fix it. **Tested Working on our system, but use at your own risk**
invoice.tpl (Starting on Line 92 for us, within the foreach loop) [co]
[/co] invoicepdf.tpl (Replace this whole foreach loop) [co]
foreach ($invoiceitems AS $item) { //These 3 lines remove 0 Quantity items, and the 4th line set the new string to the running variable $text = preg_replace("/\:\s0\sx\s/","+",$item['description']); $text = preg_replace("/.*\+/","+",$text); $text = preg_replace("/\+.*(\n?)/","",$text); $item['description'] = $text;
14 Comments
Login to post a comment.
I figure "don't show the thing the customer didn't want" was a fairly obvious feature requirement, haha
It looks REALLY unprofessional with these add ons on the invoice. Not a good look at all.
Surely something like the custom field options where you can choose where it shows up would be pretty straightforward?
It looks cheap and unprofessional.
I tried the fixes above on WHMCS 7.6.1 but it looks like it's not working any more.
Placeholder is {$invoice_html_contents}
Can a similar regex be implemented in the email body?
In viewinvoice.tpl
[co]
and in invoicepdf.tpl
[co]
These seemed to work for me on the default when I had issues just pasting your code in there. But your code got me 95% of the way there and now I know some smarty and more php.
**Tested Working on our system, but use at your own risk**
invoice.tpl (Starting on Line 92 for us, within the foreach loop)
[co]
$text = preg_replace("/\:\s0\sx\s/","+",$this->_tpl_vars['invoiceitem']['description']);
$text = preg_replace("/.*\+/","+",$text);
$text = preg_replace("/\+.*/","",$text);
$this->_tpl_vars['invoiceitem']['description'] = $text;
{/php}
invoicepdf.tpl (Replace this whole foreach loop)
[co]
//These 3 lines remove 0 Quantity items, and the 4th line set the new string to the running variable
$text = preg_replace("/\:\s0\sx\s/","+",$item['description']);
$text = preg_replace("/.*\+/","+",$text);
$text = preg_replace("/\+.*(\n?)/","",$text);
$item['description'] = $text;
$rowcount = $pdf->getNumLines($item['description'], 140);
$pdf->MultiCell(140,$rowcount * 5,$item['description'],1,'L',0,0);
$pdf->MultiCell(40,$rowcount * 5,$item['amount'],1,'C',0,0);
$pdf->Ln();
}
You're Welcome : )
-Stephen