function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lisa SeilerLisa Seiler 

Visualforce Sum Price with blank values

Hi @ all,
I have a visuaforce page. I want to summarize some currency fields. I summarize the values at the end of <apex:repeat> It works perfectly, but if one number is 0€ it is not working. The result is 0€ always.
Here is a example:
<c:NumberComponent componentValue="{!qli.Subtotal-qli.Product_Discount__c}"/>
At this case "Product_Discount__c" is 0€. The result have to be "Subtotal" (is it always filled with a currency), but the result is 0 €.
The same case if I want so summarize all "Product Discounts" at the end of my table.
<apex:variable var="SumDiscount" value="{!SumDiscount+qli.Product_Discount__c}" />

If one currency is 0€ the result is always 0€ although one other curreny is filled always!
I hope someone can help me.

Best,
Lisa
(Sorry for the bad english)