Greenix Posted March 23, 2016 Share Posted March 23, 2016 Seeing so many lines with Discount at 0 makes the client start to wonder hmmm. Anyways, how can I hide the Discount column from the PDF quote page without skewing the whole thing? (Been there done that) Thanks in advance for any assistance!! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 23, 2016 Share Posted March 23, 2016 if your quotepdf.tpl is based on the six template, you could simply remove the column from the html table. remove the "Discount" column from the heading and body of the html table, add its 15% width to the description column (or elsewhere) and, because i've removed a table column, reduce the value of the 'totals' colspan from 4 to 3. if you do that, the code should be similar to below... $tblhtml = '<table width="100%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0"> <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:center;"> <td width="5%">'.$_LANG['quoteqty'].'</td> <td width="60%">'.$_LANG['quotedesc'].'</td> <td width="15%">'.$_LANG['quoteunitprice'].'</td> <td width="20%">'.$_LANG['quotelinetotal'].'</td> </tr>'; foreach ($lineitems AS $item) { $tblhtml .= ' <tr bgcolor="#fff"> <td align="center">'.$item['qty'].'</td> <td align="left">'.nl2br($item['description']).'<br /></td> <td align="center">'.$item['unitprice'].'</td> <td align="center">'.$item['total'].'</td> </tr>'; } $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right" colspan="3">'.$_LANG['invoicessubtotal'].'</td> <td align="center">'.$subtotal.'</td> </tr>'; if ($taxlevel1['rate']>0) $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right" colspan="3">'.$taxlevel1['name'].' @ '.$taxlevel1['rate'].'%</td> <td align="center">'.$tax1.'</td> </tr>'; if ($taxlevel2['rate']>0) $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right" colspan="3">'.$taxlevel2['name'].' @ '.$taxlevel2['rate'].'%</td> <td align="center">'.$tax2.'</td> </tr>'; $tblhtml .= ' <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right" colspan="3">'.$_LANG['invoicestotal'].'</td> <td align="center">'.$total.'</td> </tr> </table>'; 0 Quote Link to comment Share on other sites More sharing options...
Greenix Posted March 23, 2016 Author Share Posted March 23, 2016 cha-ching! That did it! I didn't notice the column number on ALL the line items last time and made a hash of it. Looks great now, thank you!! 0 Quote Link to comment Share on other sites More sharing options...
braksator Posted March 25, 2016 Share Posted March 25, 2016 Nice thank you for asking this, that discount nonsense really bothers me 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.