• Resolved amirdorna

    (@amirdorna)


    Hi

    I have created an estimating system for sales reps.

    It shows them how much cost a job has and how much they have to sell for the best benefit of the company.

    Now, I want them to be a little flexible.

    What I mean,

    Cost = X
    Best Price = Y ( With 50% Gross Profit according to X)
    in this case, I want to show them if they sell by Y, they will earn 6% of Y

    But Whatever less than Y , it will decrease their commission by 0.5% and whatever they sell over Y, their will earn 1% more.

    I want them to see their commission, when they are on the form .

    Is there any way for that?

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @amirdorna,

    I’m not totally sure about your project’s description.

    But if there is a currency field for entering the product’s cost X (fieldname1), and the best price is the 150% of the cost, the equation would be simply:

    
    PREC(fieldname1*1.5,2)
    

    If there is another currency field for entering the final price (fieldname2) and you want to create an equation that return the commission:

    
    (function(){
    var x = fieldname1, y = PREC(fieldname1*1.5,2), p = fieldname2;
    if(p < y) return PREC(p*0.055,2);
    if(p==y) return PREC(y*0.06,2);
    return PREC(y*0.07,2);
    })()
    

    and that’s all.

    If you need additional support implementing your project, I can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Calculating Commission According to Gross Profit’ is closed to new replies.