Support » Plugin: Calculated Fields Form » After evry 100000, -1500

• I am creating a monthly salary calculator. i need the following
I need a net salary, after taxes.

if the salary is up to 100,000, then I pay a tax of 1,500

if the salary is up to 200,000, then I pay a tax of 3,000

if the salary is up to 300,000, then I pay a tax of 4,500
and so gave.

but even if the salary is 1,000,000,000, the maximum tax I pay is 15,000

here is the full calculator i want. I want to collect a copy

https://b24.am/salary-income-tax-calculator

screenshot of the field I’m talking about

Viewing 1 replies (of 1 total)
• Hello,

I’ll try to describe the process with a hypothetical example. Assuming the currency field is the fieldname1. And you want to emulate:

>>>
if the salary is up to 100,000, then I pay a tax of 1,500
if the salary is up to 200,000, then I pay a tax of 3,000
if the salary is up to 300,000, then I pay a tax of 4,500
and so gave.
but even if the salary is 1,000,000,000, the maximum tax I pay is 15,000

You can insert a calculated field in the form, and enter the equation:

``````(function(){
if(fieldname1 <= 100000) return 1500;
if(fieldname1 <= 200000) return 3000;
if(fieldname1 <= 300000) return 4500;
return 15000;
})()``````

Best regards.

Viewing 1 replies (of 1 total)
• You must be logged in to reply to this topic.