I am having trouble with a Formula to calculate Commissions under Entity Accounts, am I doing something wrong? Can i limit the calculations to 2 decimal places? USD
I know its a lot but, just trying to be as detailed as possible.
Problem # 1 - the Calculation is off by decimal places for the total on field commissions.
Problem # 2 - the Calculation below if I change filed voice to anything other than 'New" it does not finish the calculation for the other 2 fields 'voice' and 'internet' and just enters a 0 or null value.
I was able to duplicate all of this in the Demo CRM at http://demo.espocrm.com/advanced/?lang=en_US#
field mrc should total $241.35 (correct)
example test info for fields:
client = 'COMCAST',
term = '24 Mo',
voice = 'New',
internet = 'New',
video = 'New',
ccblmrc = '24.95',
ccfflmrc = '0',
ccmlmrc = '134.85',
ccimrc = '149.95',
ccvmrc = '81.55',
discountinternet = '70.00',
discountvoice = '79.95',
discountvideo = '0'
commission field calculated from CRM = $119.85 , should equal $120.675 rounded to $120.68
https://www.calculatorsoup.com/calcu...9&action=solve
I know its a lot but, just trying to be as detailed as possible.
Problem # 1 - the Calculation is off by decimal places for the total on field commissions.
Problem # 2 - the Calculation below if I change filed voice to anything other than 'New" it does not finish the calculation for the other 2 fields 'voice' and 'internet' and just enters a 0 or null value.
I was able to duplicate all of this in the Demo CRM at http://demo.espocrm.com/advanced/?lang=en_US#
field mrc should total $241.35 (correct)
Code:
ifThen( client == 'COMCAST', mrc = (( ccblmrc +ccfflmrc + ccmlmrc + ccimrc + ccvmrc) - (discountinternet + discountvideo + discountvoice)) ); ifThenElse( client == 'COMCAST' && term = '24 Mo', commission = ifThenElse( voice == 'New', (ccblmrc + ccfflmrc + ccmlmrc) - discountvoice * 0.5, 0 ) + ifThenElse( internet == 'New', (ccimrc - discountinternet) * 0.5, 0 ) + ifThenElse( video == 'New', (ccvmrc - discountvideo) * 0.5, 0 ), 0 );
client = 'COMCAST',
term = '24 Mo',
voice = 'New',
internet = 'New',
video = 'New',
ccblmrc = '24.95',
ccfflmrc = '0',
ccmlmrc = '134.85',
ccimrc = '149.95',
ccvmrc = '81.55',
discountinternet = '70.00',
discountvoice = '79.95',
discountvideo = '0'
commission field calculated from CRM = $119.85 , should equal $120.675 rounded to $120.68
https://www.calculatorsoup.com/calcu...9&action=solve
Comment