• Resolved jacobian64

    (@jacobian64)


    I need help in figuring out how to make a calculator table using this plugin that can solve me in creating a price table that can make calculation of full price to be included for the most expensive price and then 50% discount on subsequent lower prices. like this

    here is the screenshot
    if you see that table then you can see that 2000 + (1100/2) = 2.550 so basically the calculator table will find the high price and set it as full price and other lower prices to be set as 50% in prices

    now I am trying to find the logic as how I can make this table using calculated field forms. any help would be appreciated.
    thanks

    • This topic was modified 3 years, 9 months ago by jacobian64.
    • This topic was modified 3 years, 9 months ago by jacobian64.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jacobian64

    (@jacobian64)

    here is my code that I had made

    SUM(MAX(fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8), MIN(fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8) /2, MIN(fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8) /2 )
    

    but it still don’t worked right as when one checkbox is clicked then the sum not working correnct. any idea how to fix the code then to achieve my objective discount rule?

    Plugin Author codepeople

    (@codepeople)

    Hello @jacobian64

    The equation would be as follows:

    
    (function(){
    var m = MAX(fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8), 
    t = SUM(fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8);
    
    return SUM(m,(t-m)/2);
    })()
    

    And that’s all.
    Best regards.

    Thread Starter jacobian64

    (@jacobian64)

    yes it works great. thanks then

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘create table calculator prices for discount’ is closed to new replies.