<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/explore/help-forums/enterprise-professional/f/enterprise-professional-questions/2648/how-do-i-add-line-numbers-from-quotes-to-pdf-manager</link><description>In the Quotes module you can check &amp;quot;Display Line Numbers&amp;quot;, and while looking at the quote in the Quotes module these line item numbers are displayed. When you download a quote template though, they disappear as it is not a field out of the box in PDF</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10051?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2020 07:17:15 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:e7de13b3-800a-4748-bf4c-78836942a27a</guid><dc:creator>Luke Ridgway</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://sugarclub.sugarcrm.com/members/missybrooks"&gt;Missy Brooks&lt;/a&gt;,&lt;/p&gt;&lt;p&gt;Once you get your head around the if statement in the pdf manager then you can do loads of things, as Steve is doing.&lt;/p&gt;&lt;p&gt;I now have one PDF that can appear totally different depending on the record type, as the reulting print out goes with a product that was returned and the type determines what we do with it here - ie what the paperwork states.&lt;/p&gt;&lt;p&gt;Here is a simple example:&lt;/p&gt;&lt;p&gt;{if $fields.powersupply ==&amp;#39;&amp;#39;}&amp;nbsp; *&lt;span style="color:#999999;"&gt;This bit is empty so nothing appears if power supply was not ticked&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;{else}&amp;lt;img src=&amp;quot;&lt;/span&gt;http://our_image_url_here/img/Arrow.JPG&lt;span&gt;&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;25&amp;quot; height=&amp;quot;10&amp;quot; /&amp;gt;{/if}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;So &lt;em&gt;power supply&lt;/em&gt; is a tick box.&amp;nbsp; If it is not ticked nothing happens:&amp;nbsp;&lt;span&gt;{if $fields.powersupply ==&amp;#39;&amp;#39;}&amp;nbsp; *&amp;nbsp; {else}.....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;*The grey text area I added is just empty, unless you want to do someting else in that bit if not ticked?&lt;/p&gt;&lt;p&gt;Then the Else part shows an arrow...&lt;/p&gt;&lt;p&gt;On the record in sugar:&lt;/p&gt;&lt;p&gt;&lt;a href="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/a055b857_2D00_6252_2D00_462f_2D00_9ef3_2D00_c2f666cc6af0-3525-complete/_5F00_pastedImage_5F00_2.png"&gt;&lt;img src="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/a055b857_2D00_6252_2D00_462f_2D00_9ef3_2D00_c2f666cc6af0-3525-complete/_5F00_pastedImage_5F00_2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The resulting &lt;em&gt;arrow image&lt;/em&gt; on the PDF:&lt;/p&gt;&lt;p&gt;&lt;a href="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/37f051d5_2D00_15b5_2D00_4571_2D00_84a8_2D00_cb40b94007b2-3525-complete/_5F00_pastedImage_5F00_3.png"&gt;&lt;img src="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/37f051d5_2D00_15b5_2D00_4571_2D00_84a8_2D00_cb40b94007b2-3525-complete/_5F00_pastedImage_5F00_3.png" alt=" " /&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;NOTE:&amp;nbsp; add your IF statements in the HTML editor (like: &lt;a href="https://html-online.com/editor/" rel="nofollow" target="_blank"&gt;https://html-online.com/editor/&lt;/a&gt;&amp;nbsp;), not the pdf editor.&lt;/p&gt;&lt;p&gt;Some weird layout stuff stuff happens too if you edit in the pdf editor afterwards.&amp;nbsp; I ended up using an online html editer and pasting into the HTML view on the pdf manager.&amp;nbsp; Maybe just me here but have NEVER encountered such a difficult tool to use for a system to make PDF&amp;#39;s!!&amp;nbsp; Oh actually SAP BbyD is probably worse!&lt;/p&gt;&lt;p&gt;Also note - any tiny error in the html will mean the pdf fails to download.&lt;/p&gt;&lt;p&gt;Anyway, hope that gets you started.... then you can get into nested if statements ;-)&lt;/p&gt;&lt;p&gt;Luke.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10050?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2020 22:49:52 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:e32681bc-2a93-42a0-81e1-65f99d1de562</guid><dc:creator>Missy Brooks</dc:creator><description>&lt;p&gt;You&amp;#39;ve certainly peaked my curiosity. I&amp;#39;ve been waiting for a way to insert terms &amp;amp; conditions based on which items are inserted into the quote.&amp;nbsp;Would you mind to maybe share or&amp;nbsp;elaborate how you&amp;#39;ve used?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10049?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 18:52:24 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:434afe85-28bd-47db-9a30-4a552ab9839f</guid><dc:creator>Steve Silliker</dc:creator><description>&lt;p&gt;Glad I could help, Luke! Working with raw html on the pdf editor can be difficult.&amp;nbsp;&lt;/p&gt;&lt;p&gt;We are doing some crazy things now, including dynamically showing information on the PDF depending on the data in the Record; We allow Sales to show/hide a lot of PDF fields based on field input in the Record.. etc. So if you have any questions related to PDF&amp;#39;s, feel free to contact me anytime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10048?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 11:45:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:a8498ade-eae3-4aba-9c0d-076934bfa0b1</guid><dc:creator>Luke Ridgway</dc:creator><description>&lt;p&gt;Steve thanks for this!&amp;nbsp; Saved me some time solving it - brilliant! Exactly what I needed to do.&lt;/p&gt;&lt;p&gt;&lt;em style="background-color:#ffffff;color:#000000;"&gt;{$fields.show_line_nums+$count++}&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10047?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 03:00:00 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:ed0d21b0-a8ee-425b-8664-0ea032c4f695</guid><dc:creator>Steve Silliker</dc:creator><description>&lt;p&gt;&lt;a href="https://sugarclub.sugarcrm.com/members/tjackson_4000_steamsolutions.com"&gt;Tucker Jackson&lt;/a&gt; | &lt;a href="https://sugarclub.sugarcrm.com/members/venkatesh993"&gt;Venkatesh Prabhu&lt;/a&gt; | &lt;a href="https://sugarclub.sugarcrm.com/members/mehulsbhandari"&gt;Mehul&amp;nbsp; Bhandari&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="https://sugarclub.sugarcrm.com/explore/enterprise-professional/f/enterprise-professional-questions/2648/how-do-i-add-line-numbers-from-quotes-to-pdf-manager"&gt;Re: How do I add line numbers from quotes to PDF Manager&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Woohoo! I can finally help someone in the Sugar Community!&amp;nbsp;&lt;/p&gt;&lt;p&gt;I was having this problem and&amp;nbsp;finally got the chance to dive into the HTML/PHP code capability of the PDF Templates.&lt;/p&gt;&lt;p&gt;Turns out, all you need to do is use Smarty Modifiers.&lt;br /&gt;&lt;br /&gt;You can learn all about them here:&lt;br /&gt;&lt;a href="http://support.sugarcrm.com/Knowledge_Base/PDF_Management/Intro_to_Smarty_Modifiers/" rel="nofollow" target="_blank"&gt;http://support.sugarcrm.com/Knowledge_Base/PDF_Management/Intro_to_Smarty_Modifiers/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What I did in our templates is add the &amp;quot;Display Line Numbers&amp;quot; field into a new column at the beginning of the products block. Then I just used a smarty to add the count++. Should look like this:&amp;nbsp;&amp;nbsp;{$fields.show_line_nums+$count++}&lt;/p&gt;&lt;p&gt;Then you end up with sequential&amp;nbsp;line item numbers on your pdf!&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/89b9b01e_2D00_e658_2D00_4423_2D00_b761_2D00_b4ce424cc287-3525-complete/_5F00_pastedImage_5F00_3.png"&gt;&lt;img src="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/89b9b01e_2D00_e658_2D00_4423_2D00_b761_2D00_b4ce424cc287-3525-complete/_5F00_pastedImage_5F00_3.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You may want to adjust the width of the field by clicking the icon for it.&lt;/p&gt;&lt;p&gt;&lt;a href="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/83592771_2D00_bf18_2D00_4c19_2D00_a182_2D00_f96d83cd910b-3525-complete/_5F00_pastedImage_5F00_2.png"&gt;&lt;img src="/cfs-file/__key/CommunityServer-Components-MultipleUploadFileManager/83592771_2D00_bf18_2D00_4c19_2D00_a182_2D00_f96d83cd910b-3525-complete/_5F00_pastedImage_5F00_2.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10046?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 04:33:53 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:9bb7a5d4-68d6-4d77-94c3-a1a68e9a07a9</guid><dc:creator>Venkatesh Prabhu</dc:creator><description>&lt;p&gt;Hi @Tucker Jackson&lt;/p&gt;&lt;p&gt;I know its been almost a year, but still we can do this by using smarty template assign function in PDF manager. Let me know if you have got the solution.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10045?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 16:42:20 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:e621bfb9-b437-4840-9937-2219f65d8fba</guid><dc:creator>Mehul  Bhandari</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://sugarclub.sugarcrm.com/members/tjackson_4000_steamsolutions.com"&gt;Tucker Jackson&lt;/a&gt;&lt;/p&gt;&lt;p&gt;i think , this is the only way to solve your problem..&lt;/p&gt;&lt;p&gt;you can hire me to do this . hahahaha&amp;nbsp;&lt;span class="emoticon-inline emoticon_wink" style="height:16px;width:16px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10044?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 15:49:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:0a50ae51-253e-4787-8a22-d250b9cbe822</guid><dc:creator>Tucker Jackson</dc:creator><description>&lt;p&gt;Hi Mehul,&lt;/p&gt;&lt;p&gt;Thank you for taking the time to respond to this. &amp;nbsp;However, I am not a developer. &amp;nbsp;Is there any way to do this without coding?&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Tucker&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add line numbers from quotes to PDF Manager</title><link>https://sugarclub.sugarcrm.com/thread/10043?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 05:48:31 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:55f502ce-50ca-4f62-bd0a-d471474c33c9</guid><dc:creator>Mehul  Bhandari</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://sugarclub.sugarcrm.com/members/tjackson_4000_steamsolutions.com"&gt;Tucker Jackson&lt;/a&gt;&lt;/p&gt;&lt;p&gt;you can do through coding like ..&lt;/p&gt;&lt;p&gt;copy file from&amp;nbsp;&lt;strong&gt;modules/Quotes/sugarpdf/sugarpdf.standard.php&lt;/strong&gt; =&amp;gt; &lt;strong&gt;custom/modules/Quotes/sugarpdf/sugarpdf.standard.php&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Firstly Change for Header&amp;nbsp;&lt;/p&gt;&lt;pre class="language-php line-numbers"&gt;&lt;code&gt;&lt;span class="keyword token"&gt;private&lt;/span&gt; &lt;span class="keyword token"&gt;function&lt;/span&gt; &lt;span class="token function"&gt;_initOptions&lt;/span&gt;&lt;span class="punctuation token"&gt;(&lt;/span&gt;&lt;span class="punctuation token"&gt;)&lt;/span&gt;&lt;span class="punctuation token"&gt;{&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="variable token"&gt;$this&lt;/span&gt;&lt;span class="operator token"&gt;-&lt;/span&gt;&lt;span class="operator token"&gt;&amp;gt;&lt;/span&gt;&lt;span class="property token"&gt;itemOptions&lt;/span&gt; &lt;span class="operator token"&gt;=&lt;/span&gt; &lt;span class="keyword token"&gt;array&lt;/span&gt;&lt;span class="punctuation token"&gt;(&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="string token"&gt;&amp;quot;Sr.No&amp;quot;&lt;/span&gt; &lt;span class="operator token"&gt;=&lt;/span&gt;&lt;span class="operator token"&gt;&amp;gt;&lt;/span&gt;&lt;span class="string token"&gt;&amp;quot;6%&amp;quot;&lt;/span&gt;&lt;span class="punctuation token"&gt;,&lt;/span&gt;&lt;span class="line-numbers-rows"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;then&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style="color:#263238;font-size:13px;"&gt;//code add in your bundle list&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong style="color:#263238;font-size:13px;"&gt;declare $count=0; before loop&lt;/strong&gt;&lt;/p&gt;&lt;pre class="language-php line-numbers"&gt;&lt;code&gt; &lt;span class="keyword token"&gt;if&lt;/span&gt; &lt;span class="punctuation token"&gt;(&lt;/span&gt;&lt;span class="variable token"&gt;$line_item&lt;/span&gt;&lt;span class="operator token"&gt;-&lt;/span&gt;&lt;span class="operator token"&gt;&amp;gt;&lt;/span&gt;&lt;span class="property token"&gt;object_name&lt;/span&gt; &lt;span class="operator token"&gt;==&lt;/span&gt; &lt;span class="string token"&gt;&amp;quot;Product&amp;quot;&lt;/span&gt;&lt;span class="punctuation token"&gt;)&lt;/span&gt; &lt;span class="punctuation token"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="variable token"&gt;$item&lt;/span&gt;&lt;span class="punctuation token"&gt;[&lt;/span&gt;&lt;span class="variable token"&gt;$count&lt;/span&gt;&lt;span class="punctuation token"&gt;]&lt;/span&gt;&lt;span class="punctuation token"&gt;[&lt;/span&gt;&lt;span class="string token"&gt;"Sr.No"&lt;/span&gt;&lt;span class="punctuation token"&gt;]&lt;/span&gt; &lt;span class="operator token"&gt;=&lt;/span&gt; &lt;span class="variable token"&gt;$count&lt;/span&gt;&lt;span class="operator token"&gt;+&lt;/span&gt;&lt;span class="number token"&gt;1&lt;/span&gt;&lt;span class="punctuation token"&gt;;&lt;/span&gt; &lt;br /&gt;&lt;span class="line-numbers-rows"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Hope this Helpful to you...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>