Jump to content

How to hide Discounts in Quote PDF?


Greenix

Recommended Posts

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!!

Link to comment
Share on other sites

if your quotepdf.tpl is based on the six template, you could simply remove the column from the html table. :idea:

 

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>';

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated