• imcclellan
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Hi,

 

Does anybody know how to insert PDF pages into a dynamically created Quote PDF?  I can rewrite the PDF pages to be visualforce code, but that is tedious and my coworkers will not be able to update it if/when I move to a new role. 

 

Ideally a user would check a box and the pages (previously printed from Word) would be included in the PDF when they 'print' a quote.  I want to include some pages of legal language/terms and conditions/etc.

 

Thanks for your help! 

 

 

I have installed and customized Simple Quote, so I can print a PDF from an opportunity as a quote to include my Opportunity Products.  In the Develop->Pages->Quote->edit, I have done some simple HTML to adjust the look and feel of my PDF/Quote.

 

However, I am puzzled that this:

 

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line">

 

as it is repeating, the default "sort" on the records for OpportunityLineItems seems to be random, not even FIFO.  However, in the Opportunity, inside salesforce itself, there is the ability to SORT on Opportunity Products, and I can put them anyway I want in the opportunity.  I can not however, seem to find how to get this APEX:REPEAT to output them in the same order.

 

Has anyone a solution or a thread that is solved on this, I am new to this forum, so I apologize if I am asking a question that has been asked before.

 

Regards,

George Fassett 

I'm trying to round a number inside an IF statement, and haven't had any luck. I've seen in other threads that you can't use ROUND inside the "value" element..

 

Any ideas/help would be greatly appreciated..

 

Thanks! Chris

 

<apex:column width="150" > <apex:facet name="header">Visit Length</apex:facet> <apex:outputText value="{!IF(l.Length_of_Stay_in_Seconds__c<60, '{0} seconds', '{0} minutes')}"> <apex:param value="{!IF(l.Length_of_Stay_in_Seconds__c<60, l.Length_of_Stay_in_Seconds__c, l.Length_of_Stay_in_Seconds__c/60)}"/></apex:outputText> </apex:column>

 

 

 

  • November 04, 2009
  • Like
  • 0
I'm merging in product line items into a visualforce template and I'd like the products to sort the same way they are in the Opportunity. Does anyone know how to do this? Here is my code..

Thanks, Chris
Code:
<messaging:emailTemplate subject="Product Quote" recipientType="Contact" relatedToType="Opportunity">
<messaging:htmlEmailBody >       
<html>
        <body>
         <STYLE type="text/css">
               Body {font-size: 11px; font-face: verdana } 
               TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center } 
               TD  {font-size: 11px; font-face: verdana } 
               TABLE {border: solid #CCCCCC; border-width: 1}
               TR {border: solid #CCCCCC; border-width: 1}
         </STYLE>
             <font face="arial" size="2">
 <p>Dear {!recipient.name},</p>
         <table border="0" >
                 <tr > 
                     <th>Product Name</th><th>Quantity</th><th>Total Price</th><th>Monthly Fee</th>
                  </tr>
  <apex:repeat var="oli" value="{!relatedTo.OpportunityLineItems}">
       <tr>
           <td>{!oli.PricebookEntry.Product2.Name}</td>
           <td>{!oli.Quantity}</td>
           <td>${!oli.TotalPrice}</td>
           <td>${!oli.Extended_Monthly_Fee__c}</td>
       </tr>
 </apex:repeat> 


    </table>
    <p>
<apex:repeat var="opp" value="{!relatedTo}">
<p>
Total Subscription fees: ${!opp.X1St_Yr_ACV_Subscript__c}<br>
Total Services fees: ${!opp.Professional_Services__c}<br>
</p>
 </apex:repeat>     
    
    <p>
        Please contact me with any questions,
<apex:repeat var="o" value="{!relatedTo.Owner}">
<p>
{!o.Name}<br>
{!o.CompanyName}<br>
{!o.Phone}<br>
<a href="mailto:{!o.Email}">{!o.Email}</a><br>
</p>
 </apex:repeat> 
       <p />
 </font>
        </body>
    </html>


</messaging:htmlEmailBody>       
</messaging:emailTemplate>

 

  • November 19, 2008
  • Like
  • 0