Advertisement
bousaid

IRG 2020 VBA 2

Aug 2nd, 2021
1,675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.93 KB | None | 0 0
  1. Function IRG_N(soumis)
  2.  
  3. If soumis > 30000 Then
  4. soumis = (Int(soumis / 10)) * 10
  5. Dim TRS(5) As Variant
  6. TRS(1) = 0
  7. TRS(2) = 120000
  8. TRS(3) = 360000
  9. TRS(4) = 1440000
  10. TRS(5) = 9999999
  11. Dim Tax(5) As Variant
  12. Tax(1) = 0
  13. Tax(2) = 0
  14. Tax(3) = 20
  15. Tax(4) = 30
  16. Tax(5) = 35
  17. Dim Impan(5) As Variant
  18. Impan(1) = 0#
  19. Impan(2) = 0#
  20. Impan(3) = 48000#
  21. Impan(4) = 372000#
  22. Impan(5) = 3367999.65
  23.  
  24. brts = soumis * 12
  25. ill = 1
  26. Do While ill <= 5
  27.  If brts <= TRS(ill) Then Exit Do
  28.  ill = ill + 1
  29. Loop
  30. taux = Tax(ill)
  31. ill = ill - 1
  32. tb = TRS(ill)
  33. td = Impan(ill)
  34. n = brts - tb
  35. impota = (n * taux / 100) + td
  36. impm = impota / 12
  37. abat = (40 * impm / 100)
  38. If abat < 1000 Then abat = 1000
  39. If abat > 1500 Then abat = 1500
  40. ret = impm - abat
  41. If ret < 0 Then ret = 0
  42. RTS1 = (ret * 10)
  43. RTS1 = Int(RTS1)
  44. RTS1 = RTS1 / 10
  45. IRG_N = RTS1
  46. End If
  47. If (soumis > 30000) And (soumis <= 35000) Then
  48. IRG_N = ((RTS1 * 8) / 3) - (20000 / 3)
  49. End If
  50.  
  51. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement