+ Start a Discussion
Debbie ChrysochouDebbie Chrysochou 

Quantity into VF email without decimal

Hello I have created a custom field for Quantity(under Order Product object) to get the number as integer. Through the formula-->number-->decimal=0 and had the Standard field Quantity. The result worked fine, instead of 3.0 I do get 3.

My problem is that I have tried to get the custom field into the template and when i use quantity__c , i still get 3.0 and not 3 as i get on the order product.
User-added image
User-added image
And a snippet of the code 
<td style="background-color: #BA4697; color: #FFFFFF">
                        <b>Description-Type of Flower</b>
                    </td>
                    <td style="background-color: #BA4697; color: #FFFFFF">
                        <b>Details</b>
                    </td>
                    <td style="background-color: #BA4697; color: #FFFFFF">
                        <b>Quantity</b>
                    </td>
                    
                </tr>
                       <apex:repeat value="{!relatedTo.OrderItems}" var="lineItem">
                        <tr>
                            <td>
                                 {!lineItem.PricebookEntry.Product2.Name}
                             </td>
                             <td>
                                {!lineItem.Description}
                            </td>
                             <td>
                                 {!lineItem.Quant__c}
                            </td>
Best Answer chosen by Debbie Chrysochou
Debbie ChrysochouDebbie Chrysochou
Thank you Mr. Salesforce.

Works fine but in my case
<apex:outputText value="{0, number, ###,###}"><apex:param value="{!lineItem.Quant__c}"/></apex:outputText>

works in a way that my company wants.
 

All Answers

Jigar.LakhaniJigar.Lakhani
Hello,

Please try with
<apex:outputText value="{0, number, 000}">
	<apex:param value="{!{!lineItem.Quantity}}" />
</apex:outputText>

OR

<apex:outputText value="{0, number, 000}">
	<apex:param value="{!{!lineItem.Quant__c}}" />
</apex:outputText>

Thanks and Cheers,
Jigar
 
Jigar.LakhaniJigar.Lakhani
<apex:outputText value="{0, number, 000}">
	<apex:param value="{!lineItem.Quantity}" />
</apex:outputText>

OR

<apex:outputText value="{0, number, 000}">
	<apex:param value="{!lineItem.Quant__c}" />
</apex:outputText>
Debbie ChrysochouDebbie Chrysochou
Thank you Mr. Salesforce.

Works fine but in my case
<apex:outputText value="{0, number, ###,###}"><apex:param value="{!lineItem.Quant__c}"/></apex:outputText>

works in a way that my company wants.
 
This was selected as the best answer