In an org with multi currency enabled.
- Parent Object ISO Code set to USD
- Child field Amount = USD295.00
- Corporate Currency is set to EUR and the Conversion Rate is set to 1,0000
Debug output of Amount field (on child) using the following debug (Just to show that there are no other decimal places in the DB not being shown on the UI):
ChargentOrders__Transaction__c tran = [Select ChargentOrders__Amount__c From ChargentOrders__Transaction__c Where ID = 'a2c20000000hAXm']; Decimal orig = tran.ChargentOrders__Amount__c; system.debug(orig); orig = orig.setScale(23); system.debug(orig);
The output is below:
However when the WFR runs that evaluates if the Roll-Up Summary field (transaction_total) on the parent is Equal to another field (Total) on the parent this is the output
For some reason the rollup is changing the value to something else. The rollup is in USD, the ISO Code on the Parent is USD.
Any ideas why the Roll-Up Summary is modifying the value yet Aggregate Querys using convert currency, not using convert currency, and just regular queries mentioned above all return 295.00?
Basically, every query I make shows a result of $295.00 with no additional decimal places. The only place where this weird number is being displayed is a WFR that evaluates if the Roll-Up Summary Field is = the Amount field. And the WFR is not evaluating to true because the value of 294.999999...128 is < the value of $295.00
Per comments below I also explicitly debugged the value of the Rollup summary field (thought it was clear with the original debug of the fields being rolled up)
ChargentOrders__ChargentOrder__c ord = [Select ChargentOrders__transaction_total__c From ChargentOrders__ChargentOrder__c Where ID = 'a2Z200000021zF3']; system.debug(ord.ChargentOrders__Transaction_total__c);