Announcement

Collapse
No announcement yet.

Formula Calculations - Commissions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • yuri
    replied
    Keep Parser.php. It will be added in the next release.

    Leave a comment:


  • khopper
    commented on 's reply
    Thank you for your patience.
    I should keep the modified Parser.php file correct?

  • yuri
    replied
    It will work in one line. The problem is not in formatting. The problem is in missed parentheses in your code.

    Leave a comment:


  • khopper
    commented on 's reply
    My apologies - I had several variants of the formula and must have grabbed the wrong one.
    So the Formula code will only work in the clean readable format? I can't have it on one line?

  • yuri
    replied
    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:


  • khopper
    commented on 's reply
    the EXE is a self executable video. Created using SCREEN2SWF and exported to EXE.
    If you would prefer I can send as SWF file.
    Last edited by khopper; 07-18-2018, 07:36 PM.

  • yuri
    replied
    There is exe file, no video.

    Leave a comment:


  • yuri
    replied
    (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:


  • khopper
    replied
    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:


  • khopper
    commented on 's reply
    What is the discrepancy you are mentioning? I am following order of operations PEDMAS.
    Last edited by khopper; 07-18-2018, 06:17 PM.

  • yuri
    replied
    There is a discrepancy between your formula and calculation you provided above.

    Leave a comment:


  • yuri
    replied
    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:


  • khopper
    commented on 's reply
    is there an attachment size limit? I can send an SWF video file so you can witness....

  • yuri
    replied
    I got 120.65.

    Leave a comment:


  • khopper
    replied
    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:

Working...
X