Created
January 31, 2023 13:09
-
-
Save OpakAlex/fe040f376ca67727602015a69f14e218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int TravelDaysNumber = (int)params.duration; | |
int PolicyHolderAge = (int)params.age_on_current_date; | |
if(TravelDaysNumber < 57 && PolicyHolderAge < 75) { | |
if (params.trip_worth <= 100){ | |
price = (params.trip_worth * 6.8/100); | |
} | |
if (params.trip_worth > 100 && params.trip_worth <= 200){ | |
price = 6.8 + (params.trip_worth - 100) * 7.2 / 100; | |
} | |
if (params.trip_worth > 200 && params.trip_worth <= 300){ | |
price = 14 + (params.trip_worth - 200) * 4 / 100; | |
} | |
if (params.trip_worth > 300 && params.trip_worth <= 400){ | |
price = 18 + (params.trip_worth - 300) * 3 / 100; | |
} | |
if (params.trip_worth > 400 && params.trip_worth <= 500){ | |
price = 21 + (params.trip_worth - 400) * 3 / 100; | |
} | |
if (params.trip_worth > 500 && params.trip_worth <= 600){ | |
price = 24 + (params.trip_worth - 500) * 2 / 100; | |
} | |
if (params.trip_worth > 600 && params.trip_worth <= 700){ | |
price = 26 + (params.trip_worth - 600) * 2 / 100; | |
} | |
if (params.trip_worth > 700 && params.trip_worth <= 800){ | |
price = 28 + (params.trip_worth - 700) * 2 / 100; | |
} | |
if (params.trip_worth > 800 && params.trip_worth <= 900){ | |
price = 30 + (params.trip_worth - 800) * 2 / 100; | |
} | |
if (params.trip_worth > 900 && params.trip_worth <= 1000){ | |
price = 32 + (params.trip_worth - 900) * 2 / 100; | |
} | |
if (params.trip_worth > 1000 && params.trip_worth <= 1100){ | |
price = 34 + (params.trip_worth - 1000) * 1 / 100; | |
} | |
if (params.trip_worth > 1100 && params.trip_worth <= 1200){ | |
price = 35 + (params.trip_worth - 1100) * 1 / 100; | |
} | |
if (params.trip_worth > 1200 && params.trip_worth <= 1300){ | |
price = 36 + (params.trip_worth - 1200) * 3 / 100; | |
} | |
if (params.trip_worth > 1300 && params.trip_worth <= 1400){ | |
price = 39 + (params.trip_worth - 1300) * 3 / 100; | |
} | |
if (params.trip_worth > 1400 && params.trip_worth <= 1500){ | |
price = 42 + (params.trip_worth - 1400) * 13.68 / 100; | |
} | |
if (params.trip_worth > 1500 && params.trip_worth <= 2000){ | |
price = 55.68 + (params.trip_worth - 1500) * 2.552 / 100; | |
} | |
if (params.trip_worth > 2000 && params.trip_worth <= 2500){ | |
price = 68.44 + (params.trip_worth - 2000) * 2.32 / 100; | |
} | |
if (params.trip_worth > 2500 && params.trip_worth <= 3000){ | |
price = 80.04 + (params.trip_worth - 2500) * 2.32 / 100; | |
} | |
if (params.trip_worth > 3000 && params.trip_worth <= 3500){ | |
price = 91.64 + (params.trip_worth - 3000) * 2.552 / 100; | |
} | |
if (params.trip_worth > 3500 && params.trip_worth <= 4000){ | |
price = 104.4 + (params.trip_worth - 3500) * 2.088 / 100; | |
} | |
if (params.trip_worth > 4000 && params.trip_worth <= 4500){ | |
price = 114.84 + (params.trip_worth - 4000) * 2.552 / 100; | |
} | |
if (params.trip_worth > 4500 && params.trip_worth <= 5000){ | |
price = 127.6 + (params.trip_worth - 4500) * 2.552 / 100; | |
} | |
if (params.trip_worth > 5000 && params.trip_worth <= 5500){ | |
price = 140.36 + (params.trip_worth - 5000) * 2.088 / 100; | |
} | |
if (params.trip_worth > 5500 && params.trip_worth <= 6000){ | |
price = 150.8 + (params.trip_worth - 5500) * 2.088 / 100; | |
} | |
if (params.trip_worth > 6000 && params.trip_worth <= 6500){ | |
price = 161.24 + (params.trip_worth - 6000) * 2.32 / 100; | |
} | |
if (params.trip_worth > 6500 && params.trip_worth <= 7000){ | |
price = 172.84 + (params.trip_worth - 6500) * 2.32 / 100; | |
} | |
if (params.trip_worth > 7000 && params.trip_worth <= 7500){ | |
price = 184.44 + (params.trip_worth - 7000) * 2.32 / 100; | |
} | |
if (params.trip_worth > 7500 && params.trip_worth <= 8000){ | |
price = 196.04 + (params.trip_worth - 7500) * 2.32 / 100; | |
} | |
if (params.trip_worth > 8000 && params.trip_worth <= 8500){ | |
price = 207.64 + (params.trip_worth - 8000) * 2.32 / 100; | |
} | |
if (params.trip_worth > 8500 && params.trip_worth <= 9000){ | |
price = 219.24 + (params.trip_worth - 8500) * 2.32 / 100; | |
} | |
if (params.trip_worth > 9000 && params.trip_worth <= 9500){ | |
price = 230.84 + (params.trip_worth - 9000) * 3.48 / 100; | |
} | |
if (params.trip_worth > 9500 && params.trip_worth <= 10000){ | |
price = 248.24 + (params.trip_worth - 9500) * 3.48 / 100; | |
} | |
if (params.coverage_features_travel_person_type.contains('person_type_single')) | |
price = price * 1 * 0.83; | |
if (params.coverage_features_travel_person_type.contains('person_type_couple') || params.coverage_features_travel_person_type.contains('person_type_family')) | |
price = price * 1.0945 * 0.83; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment