took me a while to understand and create the formula so I wanted all to be able to have it easily.
Formula for Fortnighly Salaries (every 14 days)
Federal Formula : Québec-Canada Taxes Salary Component formula (Federal Formula) - ERPNext / HRMS - ERPNext Forum
SL : Salary
BON : Bonus
VR : = 4% Vacances remittance
Provincial Tax Formula :
0 if ((SL+BON+VR) >= 0 and (SL+BON+VR) <= 659.99 ) else 0.63 if ((SL+BON+VR) >= 660.00 and (SL+BON+VR) <= 669.99 ) else 2.04 if ((SL+BON+VR) >= 670.00 and (SL+BON+VR) <= 679.99 ) else 3.45 if ((SL+BON+VR) >= 680.00 and (SL+BON+VR) <= 689.99 ) else 4.86 if ((SL+BON+VR) >= 690.00 and (SL+BON+VR) <= 699.99 ) else 6.27 if ((SL+BON+VR) >= 700.00 and (SL+BON+VR) <= 709.99 ) else 7.68 if ((SL+BON+VR) >= 710.00 and (SL+BON+VR) <= 719.99 ) else 9.09 if ((SL+BON+VR) >= 720.00 and (SL+BON+VR) <= 729.99 ) else 10.50 if ((SL+BON+VR) >= 730.00 and (SL+BON+VR) <= 739.99 ) else 11.91 if ((SL+BON+VR) >= 740.00 and (SL+BON+VR) <= 749.99 ) else 13.32 if ((SL+BON+VR) >= 750.00 and (SL+BON+VR) <= 759.99 ) else 14.73 if ((SL+BON+VR) >= 760.00 and (SL+BON+VR) <= 769.99 ) else 16.14 if ((SL+BON+VR) >= 770.00 and (SL+BON+VR) <= 779.99 ) else 17.55 if ((SL+BON+VR) >= 780.00 and (SL+BON+VR) <= 789.99 ) else 18.99 if ((SL+BON+VR) >= 790.00 and (SL+BON+VR) <= 799.99 ) else 20.49 if ((SL+BON+VR) >= 800.00 and (SL+BON+VR) <= 809.99 ) else 21.99 if ((SL+BON+VR) >= 810.00 and (SL+BON+VR) <= 819.99 ) else 23.49 if ((SL+BON+VR) >= 820.00 and (SL+BON+VR) <= 829.99 ) else 24.99 if ((SL+BON+VR) >= 830.00 and (SL+BON+VR) <= 839.99 ) else 26.49 if ((SL+BON+VR) >= 840.00 and (SL+BON+VR) <= 849.99 ) else 27.99 if ((SL+BON+VR) >= 850.00 and (SL+BON+VR) <= 859.99 ) else 30.24 if ((SL+BON+VR) >= 860.00 and (SL+BON+VR) <= 879.99 ) else 33.24 if ((SL+BON+VR) >= 880.00 and (SL+BON+VR) <= 899.99 ) else 36.24 if ((SL+BON+VR) >= 900.00 and (SL+BON+VR) <= 919.99 ) else 39.24 if ((SL+BON+VR) >= 920.00 and (SL+BON+VR) <= 939.99 ) else 42.24 if ((SL+BON+VR) >= 940.00 and (SL+BON+VR) <= 959.99 ) else 45.24 if ((SL+BON+VR) >= 960.00 and (SL+BON+VR) <= 979.99 ) else 48.24 if ((SL+BON+VR) >= 980.00 and (SL+BON+VR) <= 999.99 ) else 51.24 if ((SL+BON+VR) >= 1000.00 and (SL+BON+VR) <= 1019.99 ) else 54.24 if ((SL+BON+VR) >= 1020.00 and (SL+BON+VR) <= 1039.99 ) else 57.24 if ((SL+BON+VR) >= 1040.00 and (SL+BON+VR) <= 1059.99 ) else 60.24 if ((SL+BON+VR) >= 1060.00 and (SL+BON+VR) <= 1079.99 ) else 63.24 if ((SL+BON+VR) >= 1080.00 and (SL+BON+VR) <= 1099.99 ) else 66.24 if ((SL+BON+VR) >= 1100.00 and (SL+BON+VR) <= 1119.99 ) else 69.24 if ((SL+BON+VR) >= 1120.00 and (SL+BON+VR) <= 1139.99 ) else 72.24 if ((SL+BON+VR) >= 1140.00 and (SL+BON+VR) <= 1159.99 ) else 75.24 if ((SL+BON+VR) >= 1160.00 and (SL+BON+VR) <= 1179.99 ) else 78.24 if ((SL+BON+VR) >= 1180.00 and (SL+BON+VR) <= 1199.99 ) else 81.24 if ((SL+BON+VR) >= 1200.00 and (SL+BON+VR) <= 1219.99 ) else 84.24 if ((SL+BON+VR) >= 1220.00 and (SL+BON+VR) <= 1239.99 ) else 87.24 if ((SL+BON+VR) >= 1240.00 and (SL+BON+VR) <= 1259.99 ) else 90.24 if ((SL+BON+VR) >= 1260.00 and (SL+BON+VR) <= 1279.99 ) else 93.24 if ((SL+BON+VR) >= 1280.00 and (SL+BON+VR) <= 1299.99 ) else 96.24 if ((SL+BON+VR) >= 1300.00 and (SL+BON+VR) <= 1319.99 ) else 99.24 if ((SL+BON+VR) >= 1320.00 and (SL+BON+VR) <= 1339.99 ) else 102.24 if ((SL+BON+VR) >= 1340.00 and (SL+BON+VR) <= 1359.99 ) else 105.24 if ((SL+BON+VR) >= 1360.00 and (SL+BON+VR) <= 1379.99 ) else 108.24 if ((SL+BON+VR) >= 1380.00 and (SL+BON+VR) <= 1399.99 ) else 111.24 if ((SL+BON+VR) >= 1400.00 and (SL+BON+VR) <= 1419.99 ) else 114.24 if ((SL+BON+VR) >= 1420.00 and (SL+BON+VR) <= 1439.99 ) else 117.24 if ((SL+BON+VR) >= 1440.00 and (SL+BON+VR) <= 1459.99 ) else 120.24 if ((SL+BON+VR) >= 1460.00 and (SL+BON+VR) <= 1479.99 ) else 123.24 if ((SL+BON+VR) >= 1480.00 and (SL+BON+VR) <= 1499.99 ) else 126.24 if ((SL+BON+VR) >= 1500.00 and (SL+BON+VR) <= 1519.99 ) else 129.24 if ((SL+BON+VR) >= 1520.00 and (SL+BON+VR) <= 1539.99 ) else 132.24 if ((SL+BON+VR) >= 1540.00 and (SL+BON+VR) <= 1559.99 ) else 135.24 if ((SL+BON+VR) >= 1560.00 and (SL+BON+VR) <= 1579.99 ) else 138.24 if ((SL+BON+VR) >= 1580.00 and (SL+BON+VR) <= 1599.99 ) else 141.24 if ((SL+BON+VR) >= 1600.00 and (SL+BON+VR) <= 1619.99 ) else 144.24 if ((SL+BON+VR) >= 1620.00 and (SL+BON+VR) <= 1639.99 ) else 147.24 if ((SL+BON+VR) >= 1640.00 and (SL+BON+VR) <= 1659.99 ) else 150.24 if ((SL+BON+VR) >= 1660.00 and (SL+BON+VR) <= 1679.99 ) else 153.24 if ((SL+BON+VR) >= 1680.00 and (SL+BON+VR) <= 1699.99 ) else 156.24 if ((SL+BON+VR) >= 1700.00 and (SL+BON+VR) <= 1719.99 ) else 159.24 if ((SL+BON+VR) >= 1720.00 and (SL+BON+VR) <= 1739.99 ) else 162.24 if ((SL+BON+VR) >= 1740.00 and (SL+BON+VR) <= 1759.99 ) else 165.24 if ((SL+BON+VR) >= 1760.00 and (SL+BON+VR) <= 1779.99 ) else 168.24 if ((SL+BON+VR) >= 1780.00 and (SL+BON+VR) <= 1799.99 ) else 171.24 if ((SL+BON+VR) >= 1800.00 and (SL+BON+VR) <= 1819.99 ) else 174.34 if ((SL+BON+VR) >= 1820.00 and (SL+BON+VR) <= 1839.99 ) else 178.34 if ((SL+BON+VR) >= 1840.00 and (SL+BON+VR) <= 1859.99 ) else 182.34 if ((SL+BON+VR) >= 1860.00 and (SL+BON+VR) <= 1879.99 ) else 186.34 if ((SL+BON+VR) >= 1880.00 and (SL+BON+VR) <= 1899.99 ) else 190.34 if ((SL+BON+VR) >= 1900.00 and (SL+BON+VR) <= 1919.99 ) else 194.34 if ((SL+BON+VR) >= 1920.00 and (SL+BON+VR) <= 1939.99 ) else 198.34 if ((SL+BON+VR) >= 1940.00 and (SL+BON+VR) <= 1959.99 ) else 202.34 if ((SL+BON+VR) >= 1960.00 and (SL+BON+VR) <= 1979.99 ) else 206.34 if ((SL+BON+VR) >= 1980.00 and (SL+BON+VR) <= 1999.99 ) else 210.34 if ((SL+BON+VR) >= 2000.00 and (SL+BON+VR) <= 2019.99 ) else 214.34 if ((SL+BON+VR) >= 2020.00 and (SL+BON+VR) <= 2039.99 ) else 218.34 if ((SL+BON+VR) >= 2040.00 and (SL+BON+VR) <= 2059.99 ) else 222.34 if ((SL+BON+VR) >= 2060.00 and (SL+BON+VR) <= 2079.99 ) else 226.34 if ((SL+BON+VR) >= 2080.00 and (SL+BON+VR) <= 2099.99 ) else 230.34 if ((SL+BON+VR) >= 2100.00 and (SL+BON+VR) <= 2119.99 ) else 234.34 if ((SL+BON+VR) >= 2120.00 and (SL+BON+VR) <= 2139.99 ) else 238.34 if ((SL+BON+VR) >= 2140.00 and (SL+BON+VR) <= 2159.99 ) else 242.34 if ((SL+BON+VR) >= 2160.00 and (SL+BON+VR) <= 2179.99 ) else 246.34 if ((SL+BON+VR) >= 2180.00 and (SL+BON+VR) <= 2199.99 ) else 250.34 if ((SL+BON+VR) >= 2200.00 and (SL+BON+VR) <= 2219.99 ) else 254.34 if ((SL+BON+VR) >= 2220.00 and (SL+BON+VR) <= 2239.99 ) else 258.34 if ((SL+BON+VR) >= 2240.00 and (SL+BON+VR) <= 2259.99 ) else 262.34 if ((SL+BON+VR) >= 2260.00 and (SL+BON+VR) <= 2279.99 ) else 266.34 if ((SL+BON+VR) >= 2280.00 and (SL+BON+VR) <= 2299.99 ) else 270.34 if ((SL+BON+VR) >= 2300.00 and (SL+BON+VR) <= 2319.99 ) else 274.34 if ((SL+BON+VR) >= 2320.00 and (SL+BON+VR) <= 2339.99 ) else 278.34 if ((SL+BON+VR) >= 2340.00 and (SL+BON+VR) <= 2359.99 ) else 282.34 if ((SL+BON+VR) >= 2360.00 and (SL+BON+VR) <= 2379.99 ) else 286.34 if ((SL+BON+VR) >= 2380.00 and (SL+BON+VR) <= 2399.99 ) else 290.34 if ((SL+BON+VR) >= 2400.00 and (SL+BON+VR) <= 2419.99 ) else 294.34 if ((SL+BON+VR) >= 2420.00 and (SL+BON+VR) <= 2439.99 ) else 298.34 if ((SL+BON+VR) >= 2440.00 and (SL+BON+VR) <= 2459.99 ) else 304.34 if ((SL+BON+VR) >= 2460.00 and (SL+BON+VR) <= 2499.99 ) else 312.34 if ((SL+BON+VR) >= 2500.00 and (SL+BON+VR) <= 2539.99 ) else 320.34 if ((SL+BON+VR) >= 2540.00 and (SL+BON+VR) <= 2579.99 ) else 328.34 if ((SL+BON+VR) >= 2580.00 and (SL+BON+VR) <= 2619.99 ) else 336.34 if ((SL+BON+VR) >= 2620.00 and (SL+BON+VR) <= 2659.99 ) else 344.34 if ((SL+BON+VR) >= 2660.00 and (SL+BON+VR) <= 2699.99 ) else 352.34 if ((SL+BON+VR) >= 2700.00 and (SL+BON+VR) <= 2739.99 ) else 360.34 if ((SL+BON+VR) >= 2740.00 and (SL+BON+VR) <= 2779.99 ) else 368.34 if ((SL+BON+VR) >= 2780.00 and (SL+BON+VR) <= 2819.99 ) else 376.34 if ((SL+BON+VR) >= 2820.00 and (SL+BON+VR) <= 2859.99 ) else 384.34 if ((SL+BON+VR) >= 2860.00 and (SL+BON+VR) <= 2899.99 ) else 392.34 if ((SL+BON+VR) >= 2900.00 and (SL+BON+VR) <= 2939.99 ) else 400.34 if ((SL+BON+VR) >= 2940.00 and (SL+BON+VR) <= 2979.99 ) else 408.34 if ((SL+BON+VR) >= 2980.00 and (SL+BON+VR) <= 3019.99 ) else 416.34 if ((SL+BON+VR) >= 3020.00 and (SL+BON+VR) <= 3059.99 ) else 424.34 if ((SL+BON+VR) >= 3060.00 and (SL+BON+VR) <= 3099.99 ) else 432.34 if ((SL+BON+VR) >= 3100.00 and (SL+BON+VR) <= 3139.99 ) else 440.34 if ((SL+BON+VR) >= 3140.00 and (SL+BON+VR) <= 3179.99 ) else 448.34 if ((SL+BON+VR) >= 3180.00 and (SL+BON+VR) <= 3219.99 ) else 456.34 if ((SL+BON+VR) >= 3220.00 and (SL+BON+VR) <= 3259.99 ) else 464.34 if ((SL+BON+VR) >= 3260.00 and (SL+BON+VR) <= 3299.99 ) else 472.34 if ((SL+BON+VR) >= 3300.00 and (SL+BON+VR) <= 3339.99 ) else 480.34 if ((SL+BON+VR) >= 3340.00 and (SL+BON+VR) <= 3379.99 ) else 488.34 if ((SL+BON+VR) >= 3380.00 and (SL+BON+VR) <= 3419.99 ) else 496.34 if ((SL+BON+VR) >= 3420.00 and (SL+BON+VR) <= 3459.99 ) else 504.34 if ((SL+BON+VR) >= 3460.00 and (SL+BON+VR) <= 3499.99 ) else 512.34 if ((SL+BON+VR) >= 3500.00 and (SL+BON+VR) <= 3539.99 ) else 520.34 if ((SL+BON+VR) >= 3540.00 and (SL+BON+VR) <= 3579.99 ) else 528.34 if ((SL+BON+VR) >= 3580.00 and (SL+BON+VR) <= 3619.99 ) else 537.61 if ((SL+BON+VR) >= 3620.00 and (SL+BON+VR) <= 3659.99 ) else 547.21 if ((SL+BON+VR) >= 3660.00 and (SL+BON+VR) <= 3699.99 ) else 556.81 if ((SL+BON+VR) >= 3700.00 and (SL+BON+VR) <= 3739.99 ) else 566.41 if ((SL+BON+VR) >= 3740.00 and (SL+BON+VR) <= 3779.99 ) else 576.01 if ((SL+BON+VR) >= 3780.00 and (SL+BON+VR) <= 3819.99 ) else 585.61 if ((SL+BON+VR) >= 3820.00 and (SL+BON+VR) <= 3859.99 ) else 595.21 if ((SL+BON+VR) >= 3860.00 and (SL+BON+VR) <= 3899.99 ) else 604.81 if ((SL+BON+VR) >= 3900.00 and (SL+BON+VR) <= 3939.99 ) else 614.41 if ((SL+BON+VR) >= 3940.00 and (SL+BON+VR) <= 3979.99 ) else 624.01 if ((SL+BON+VR) >= 3980.00 and (SL+BON+VR) <= 4019.99 ) else 633.61 if ((SL+BON+VR) >= 4020.00 and (SL+BON+VR) <= 4059.99 ) else 648.01 if ((SL+BON+VR) >= 4060.00 and (SL+BON+VR) <= 4139.99 ) else 667.21 if ((SL+BON+VR) >= 4140.00 and (SL+BON+VR) <= 4219.99 ) else 686.41 if ((SL+BON+VR) >= 4220.00 and (SL+BON+VR) <= 4299.99 ) else 705.61 if ((SL+BON+VR) >= 4300.00 and (SL+BON+VR) <= 4379.99 ) else 725.50 if ((SL+BON+VR) >= 4380.00 and (SL+BON+VR) <= 4459.99 ) else 746.10 if ((SL+BON+VR) >= 4460.00 and (SL+BON+VR) <= 4539.99 ) else 766.70 if ((SL+BON+VR) >= 4540.00 and (SL+BON+VR) <= 4619.99 ) else 787.30 if ((SL+BON+VR) >= 4620.00 and (SL+BON+VR) <= 4699.99 ) else 807.90 if ((SL+BON+VR) >= 4700.00 and (SL+BON+VR) <= 4779.99 ) else 828.50 if ((SL+BON+VR) >= 4780.00 and (SL+BON+VR) <= 4859.99 ) else 849.10 if ((SL+BON+VR) >= 4860.00 and (SL+BON+VR) <= 4939.99 ) else 869.70 if ((SL+BON+VR) >= 4940.00 and (SL+BON+VR) <= 5019.99 ) else 890.30 if ((SL+BON+VR) >= 5020.00 and (SL+BON+VR) <= 5099.99 ) else 910.90 if ((SL+BON+VR) >= 5100.00 and (SL+BON+VR) <= 5179.99 ) else 931.50 if ((SL+BON+VR) >= 5180.00 and (SL+BON+VR) <= 5259.99 ) else 952.10 if ((SL+BON+VR) >= 5260.00 and (SL+BON+VR) <= 5339.99 ) else 972.70 if ((SL+BON+VR) >= 5340.00 and (SL+BON+VR) <= 5419.99 ) else 993.30 if ((SL+BON+VR) >= 5420.00 and (SL+BON+VR) <= 5499.99 ) else 1013.90 if ((SL+BON+VR) >= 5500.00 and (SL+BON+VR) <= 5579.99 ) else 1034.50 if ((SL+BON+VR) >= 5580.00 and (SL+BON+VR) <= 5659.99 ) else 1055.10 if ((SL+BON+VR) >= 5660.00 and (SL+BON+VR) <= 5739.99 ) else 1075.70 if ((SL+BON+VR) >= 5740.00 and (SL+BON+VR) <= 5819.99 ) else 1096.30 if ((SL+BON+VR) >= 5820.00 and (SL+BON+VR) <= 5899.99 ) else 1116.90 if ((SL+BON+VR) >= 5900.00 and (SL+BON+VR) <= 5979.99 ) else 1137.50 if ((SL+BON+VR) >= 5980.00 and (SL+BON+VR) <= 6059.99 ) else 1158.10 if ((SL+BON+VR) >= 6060.00 and (SL+BON+VR) <= 6139.99 ) else 1178.70 if ((SL+BON+VR) >= 6140.00 and (SL+BON+VR) <= 6219.99 ) else 1199.30 if ((SL+BON+VR) >= 6220.00 and (SL+BON+VR) <= 6299.99 ) else 1219.90 if ((SL+BON+VR) >= 6300.00 and (SL+BON+VR) <= 6379.99 ) else 1240.50 if ((SL+BON+VR) >= 6380.00 and (SL+BON+VR) <= 6459.99 ) else 1261.10 if ((SL+BON+VR) >= 6460.00 and (SL+BON+VR) <= 6539.99 ) else 1281.70 if ((SL+BON+VR) >= 6540.00 and (SL+BON+VR) <= 6619.99 ) else 1302.30 if ((SL+BON+VR) >= 6620.00 and (SL+BON+VR) <= 6699.99 ) else 1322.90 if ((SL+BON+VR) >= 6700.00 and (SL+BON+VR) <= 6779.99 ) else 1343.50 if ((SL+BON+VR) >= 6780.00 and (SL+BON+VR) <= 6859.99 ) else 1364.10 if ((SL+BON+VR) >= 6860.00 and (SL+BON+VR) <= 6939.99 ) else 1384.70 if ((SL+BON+VR) >= 6940.00 and (SL+BON+VR) <= 7019.99 ) else 1405.30 if ((SL+BON+VR) >= 7020.00 and (SL+BON+VR) <= 7099.99 ) else 1425.90 if ((SL+BON+VR) >= 7100.00 and (SL+BON+VR) <= 7179.99 ) else 1446.50 if ((SL+BON+VR) >= 7180.00 and (SL+BON+VR) <= 7259.99 ) else 1457.09