+ Start a Discussion
vfexp41vfexp41 

Email-template

I am working with visualforce template i am getting all decimal values in my mail but i want to round it in Max upto 2 decimals.How can i achive

 <messaging:emailTemplate recipientType="Contact" relatedToType="Quote__c" subject="Your requested quote #{!relatedTo.Name}" >
      <messaging:htmlEmailBody>
                <apex:outputField value="{!relatedTo.Total_Price__c}"/>
              <apex:outputField value="{!relatedTo.Total_Shipping__c}"/>  
            <apex:outputField value="{!relatedTo.Gtotal__c}"/>
     </messaging:htmlEmailBody>

     </messaging:emailTemplate>

MY OUTPUT IS--->>

     SubTotal  $90.0000
   Shipping & handling     $2.000
 Grand Total(Incl.Tax)  $100.1700
_Prasu__Prasu_
I think this should give you expected output.
<apex:outputText value=”{0, number,$###,###,##0.00}”><apex:param value=”{!relatedTo.Total_Price__c}” /></apex:outputText> 
vfexp41vfexp41
@Prasanna__d

  open quote is expected for attribute "value" associated with an element type "apex:outputText"
Error Error: Open quote is expected for attribute "value" associated with an element type "apex:outputText". when i place your code at that time showing an error