Advertisement
bousaid

IRG 2022_H Windev

Jan 8th, 2022 (edited)
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. // IRG 2022 PROCEDURE By Boussaid Mustafa
  2. // APC SALI 2022
  3. //Usage:
  4. //Normal
  5. //SAI_irg = IRG_2022(1,SAI_Brut)
  6. //Handicape
  7. //SAI_irg = IRG_2022(2,SAI_Brut)
  8. PROCEDURE IRG_2022(Type_IRG is int, Soumis)
  9.  
  10. rIrg is real
  11. p is real = IntegerPart(Soumis/10)*10
  12.  
  13. IF (Soumis <= 30000 ) THEN
  14. rIrg = 0
  15. ELSE
  16.  
  17. SWITCH Soumis
  18. CASE 30010 TO 40000 : rIrg = (p - 20000) * 0.23
  19. CASE 40000 TO 80000: rIrg = 4600 + (p - 40000) * 0.27
  20. CASE 80000 TO 160000: rIrg = 15400 + (p - 80000) * 0.3
  21. CASE 160000 TO 320000: rIrg = 39400 + (p - 160000) * 0.33
  22. OTHER CASE: rIrg = 92200 + (p - 320000) * 0.35
  23. END
  24.  
  25. Abat is real = rIrg * 0.4
  26. IF Abat < 1000 THEN Abat = 1000
  27. IF Abat > 1500 THEN Abat = 1500
  28. rIrg = rIrg - Abat
  29.  
  30. // 1= Normal 2= Handicape
  31. SWITCH Type_IRG
  32. CASE 1 //---->Normal
  33. IF Soumis <= 35000 THEN
  34. rIrg = (rIrg * 137/51)-(27925/8)
  35. END
  36. CASE 2 //---->Handicape
  37. IF Soumis < 42500 THEN
  38. rIrg = (rIrg * 93/61)-(81213/41)
  39. END
  40.  
  41. OTHER CASE
  42.  
  43. END
  44. END
  45. rIrg = Round(rIrg,1)
  46. RESULT rIrg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement