Announcement
Collapse
No announcement yet.
Formula Calculations - Commissions
Collapse
X
-
It will work in one line. The problem is not in formatting. The problem is in missed parentheses in your code.
Leave a comment:
-
I fixed your code to correspond to calculations you provided:
Code: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 ) , commission = 0 );
It gives 120.675 !!!Last edited by yuri; 07-18-2018, 07:41 PM.
Leave a comment:
-
(149.95 - 70.00) = 79.95 * 0.5 = 39.975
and
ccimrc - discountinternet * 0.5
(81.55 - 0.00) = 81.55 * 0.5 = 40.75
and
ccvmrc - discountvideo * 0.5
Leave a comment:
-
Here is a video: https://ufile.io/xzfx1
using the new Parser.php file and both formulas in the clean readable formats both giving inaccurate calculations.
Please advise, this form doesn't appear to allow uploads larger than 97kb.
Leave a comment:
-
There is a discrepancy between your formula and calculation you provided above.
Leave a comment:
-
I formatted your code. Please use formatting to make it readable,
Code: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 );
Leave a comment:
-
Total 241.35 / 0.5 = 120.675
Formula: 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);
manually checking:
(ccblmrc = '24.95' + ccfflmrc = '0' + ccmlmrc = '134.85' - discountvoice = '79.95') * 0.5 + (ccimrc = '149.95' - discountinternet = '70.00') * 0.5 + (ccvmrc = '81.55' - discountvideo = '0') * 0.5 =
(24.95+0.00+134.85-79.95) = 79.85 * 0.5 = 39.925
(149.95 - 70.00) = 79.95 * 0.5 = 39.975
(81.55 - 0.00) = 81.55 * 0.5 = 40.75
39.925 + 39.975 + 40.75 = 120.65
Should not = 319.33
Leave a comment:
Leave a comment: