payroll-rules-india 2.10.1 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.js +6 -0
  3. package/dist/rules/fy2024_2025/acChargesRules.d.ts +2 -0
  4. package/dist/rules/fy2024_2025/acChargesRules.js +10 -0
  5. package/dist/rules/fy2024_2025/additionalAllowanceRules.d.ts +2 -0
  6. package/dist/rules/fy2024_2025/additionalAllowanceRules.js +12 -0
  7. package/dist/rules/fy2024_2025/basicRules.d.ts +5 -0
  8. package/dist/rules/fy2024_2025/basicRules.js +65 -0
  9. package/dist/rules/fy2024_2025/bonusRules.d.ts +3 -0
  10. package/dist/rules/fy2024_2025/bonusRules.js +23 -0
  11. package/dist/rules/fy2024_2025/conveyanceAllowanceRules.d.ts +6 -0
  12. package/dist/rules/fy2024_2025/conveyanceAllowanceRules.js +59 -0
  13. package/dist/rules/fy2024_2025/dearnessAllowanceRules.d.ts +2 -0
  14. package/dist/rules/fy2024_2025/dearnessAllowanceRules.js +11 -0
  15. package/dist/rules/fy2024_2025/earnedleaveRules.d.ts +3 -0
  16. package/dist/rules/fy2024_2025/earnedleaveRules.js +23 -0
  17. package/dist/rules/fy2024_2025/emergencyAllowanceRules.d.ts +2 -0
  18. package/dist/rules/fy2024_2025/emergencyAllowanceRules.js +12 -0
  19. package/dist/rules/fy2024_2025/employerEsiRules.d.ts +2 -0
  20. package/dist/rules/fy2024_2025/employerEsiRules.js +11 -0
  21. package/dist/rules/fy2024_2025/employerPfRules.d.ts +2 -0
  22. package/dist/rules/fy2024_2025/employerPfRules.js +11 -0
  23. package/dist/rules/fy2024_2025/esiRules.d.ts +6 -0
  24. package/dist/rules/fy2024_2025/esiRules.js +54 -0
  25. package/dist/rules/fy2024_2025/extraBasicRules.d.ts +2 -0
  26. package/dist/rules/fy2024_2025/extraBasicRules.js +11 -0
  27. package/dist/rules/fy2024_2025/fuelAllowanceRules.d.ts +2 -0
  28. package/dist/rules/fy2024_2025/fuelAllowanceRules.js +12 -0
  29. package/dist/rules/fy2024_2025/generalAllowanceRules.d.ts +2 -0
  30. package/dist/rules/fy2024_2025/generalAllowanceRules.js +12 -0
  31. package/dist/rules/fy2024_2025/geyserAllowanceRules.d.ts +2 -0
  32. package/dist/rules/fy2024_2025/geyserAllowanceRules.js +11 -0
  33. package/dist/rules/fy2024_2025/hraRules.d.ts +8 -0
  34. package/dist/rules/fy2024_2025/hraRules.js +82 -0
  35. package/dist/rules/fy2024_2025/incomeTaxRules.d.ts +2 -0
  36. package/dist/rules/fy2024_2025/incomeTaxRules.js +15 -0
  37. package/dist/rules/fy2024_2025/index.d.ts +38 -0
  38. package/dist/rules/fy2024_2025/index.js +38 -0
  39. package/dist/rules/fy2024_2025/jaggeryAllowanceRule.d.ts +2 -0
  40. package/dist/rules/fy2024_2025/jaggeryAllowanceRule.js +10 -0
  41. package/dist/rules/fy2024_2025/leaveAllowanceRules.d.ts +3 -0
  42. package/dist/rules/fy2024_2025/leaveAllowanceRules.js +24 -0
  43. package/dist/rules/fy2024_2025/localAllowanceRules.d.ts +2 -0
  44. package/dist/rules/fy2024_2025/localAllowanceRules.js +11 -0
  45. package/dist/rules/fy2024_2025/medicalAllowanceRules.d.ts +3 -0
  46. package/dist/rules/fy2024_2025/medicalAllowanceRules.js +24 -0
  47. package/dist/rules/fy2024_2025/mobileAllowanceRules.d.ts +7 -0
  48. package/dist/rules/fy2024_2025/mobileAllowanceRules.js +68 -0
  49. package/dist/rules/fy2024_2025/nationalHolidayRules.d.ts +6 -0
  50. package/dist/rules/fy2024_2025/nationalHolidayRules.js +60 -0
  51. package/dist/rules/fy2024_2025/optionalHolidayRules.d.ts +2 -0
  52. package/dist/rules/fy2024_2025/optionalHolidayRules.js +12 -0
  53. package/dist/rules/fy2024_2025/otherAllowanceRules.d.ts +4 -0
  54. package/dist/rules/fy2024_2025/otherAllowanceRules.js +35 -0
  55. package/dist/rules/fy2024_2025/otherDeductionsRule.d.ts +2 -0
  56. package/dist/rules/fy2024_2025/otherDeductionsRule.js +11 -0
  57. package/dist/rules/fy2024_2025/otherPaidHolidayRules.d.ts +2 -0
  58. package/dist/rules/fy2024_2025/otherPaidHolidayRules.js +12 -0
  59. package/dist/rules/fy2024_2025/overTimesRules.d.ts +3 -0
  60. package/dist/rules/fy2024_2025/overTimesRules.js +20 -0
  61. package/dist/rules/fy2024_2025/pfRules.d.ts +4 -0
  62. package/dist/rules/fy2024_2025/pfRules.js +34 -0
  63. package/dist/rules/fy2024_2025/profTaxRules.d.ts +2 -0
  64. package/dist/rules/fy2024_2025/profTaxRules.js +11 -0
  65. package/dist/rules/fy2024_2025/professionTaxrules.d.ts +2 -0
  66. package/dist/rules/fy2024_2025/professionTaxrules.js +10 -0
  67. package/dist/rules/fy2024_2025/quarterRentRules.d.ts +2 -0
  68. package/dist/rules/fy2024_2025/quarterRentRules.js +10 -0
  69. package/dist/rules/fy2024_2025/retentionBonusRules.d.ts +7 -0
  70. package/dist/rules/fy2024_2025/retentionBonusRules.js +69 -0
  71. package/dist/rules/fy2024_2025/retrenchmentRules.d.ts +2 -0
  72. package/dist/rules/fy2024_2025/retrenchmentRules.js +12 -0
  73. package/dist/rules/fy2024_2025/rfbRules.d.ts +2 -0
  74. package/dist/rules/fy2024_2025/rfbRules.js +11 -0
  75. package/dist/rules/fy2024_2025/safetyAllowanceRules.d.ts +4 -0
  76. package/dist/rules/fy2024_2025/safetyAllowanceRules.js +32 -0
  77. package/dist/rules/fy2024_2025/shiftAllowanceRules.d.ts +5 -0
  78. package/dist/rules/fy2024_2025/shiftAllowanceRules.js +44 -0
  79. package/dist/rules/fy2024_2025/specialAllowanceRules.d.ts +3 -0
  80. package/dist/rules/fy2024_2025/specialAllowanceRules.js +22 -0
  81. package/dist/rules/fy2024_2025/teaAllowanceRules.d.ts +2 -0
  82. package/dist/rules/fy2024_2025/teaAllowanceRules.js +12 -0
  83. package/dist/rules/fy2024_2025/uniformAllowanceRules.d.ts +6 -0
  84. package/dist/rules/fy2024_2025/uniformAllowanceRules.js +58 -0
  85. package/dist/rules/fy2024_2025/washingAllowanceRules.d.ts +11 -0
  86. package/dist/rules/fy2024_2025/washingAllowanceRules.js +105 -0
  87. package/dist/rules/index.d.ts +5 -0
  88. package/dist/rules/index.js +4 -0
  89. package/dist/utils/ruleEvaluator.d.ts +2 -0
  90. package/dist/utils/ruleEvaluator.js +32 -0
  91. package/dist/utils/types.d.ts +44 -0
  92. package/dist/utils/types.js +1 -0
  93. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ export * from "./utils/types";
2
+ export * from "./utils/ruleEvaluator";
3
+ export * as rules2024_2025 from "./rules/fy2024_2025";
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // src/index.ts
2
+ // Export utility modules
3
+ export * from "./utils/types";
4
+ export * from "./utils/ruleEvaluator";
5
+ // Export all rules (by version)
6
+ export * as rules2024_2025 from "./rules/fy2024_2025";
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const acChargesRule: Rule;
@@ -0,0 +1,10 @@
1
+ export const acChargesRule = {
2
+ ruleCode: "AC_CHARGES",
3
+ name: "AC Charges",
4
+ category: "Deduction",
5
+ type: "Fixed",
6
+ version: "FY2024-2025",
7
+ description: "Fixed monthly AC charges deduction of Rs.1625.",
8
+ condition: "true",
9
+ monthlyFormula: "1625",
10
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const additionalAllowanceRule: Rule;
@@ -0,0 +1,12 @@
1
+ // Additional Allowance: (2000/working days in month) * payable days
2
+ export const additionalAllowanceRule = {
3
+ ruleCode: "ADDITIONAL_ALLOWANCE",
4
+ name: "Additional Allowance",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Additional Allowance = (2000/working days in month) * payable days",
9
+ condition: "workingDaysInMonth > 0 && payableDays > 0",
10
+ monthlyFormula: "round((2000 / workingDaysInMonth) * payableDays, 2)",
11
+ annualFormula: "round(((2000 / workingDaysInMonth) * payableDays) * 12, 2)",
12
+ };
@@ -0,0 +1,5 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const basicRule: Rule;
3
+ export declare const basicDailyWagesRule: Rule;
4
+ export declare const basicGrossEarnings50Rule: Rule;
5
+ export declare const basicGrossEarnings40Rule: Rule;
@@ -0,0 +1,65 @@
1
+ export const basicRule = {
2
+ ruleCode: "BASIC_DA",
3
+ name: "Basic + Dearness Allowance",
4
+ category: "Earning",
5
+ type: "Custom",
6
+ version: "FY2024-2025",
7
+ description: `
8
+ Basic + DA calculation based on wage code:
9
+ - If CTC <= 36,305 => Basic + DA = ₹18,135
10
+ - If CTC > 36,305 => Basic + DA = 50% of CTC
11
+ `,
12
+ condition: "ctc > 0",
13
+ // For monthly CTC input
14
+ monthlyFormula: `
15
+ round(
16
+ ctc <= 36305 ? 18135 : (ctc * 0.5),
17
+ 2
18
+ )
19
+ `,
20
+ // For annual CTC input
21
+ annualFormula: `
22
+ round(
23
+ (ctc / 12) <= 36305
24
+ ? (18135 * 12)
25
+ : (ctc * 0.5),
26
+ 2
27
+ )
28
+ `,
29
+ };
30
+ // Basic calculation: Daily wages * worked days
31
+ export const basicDailyWagesRule = {
32
+ ruleCode: "BASIC_DAILY_WAGES",
33
+ name: "Basic (Daily Wages)",
34
+ category: "Earning",
35
+ type: "Custom",
36
+ version: "FY2024-2025",
37
+ description: "Basic = Daily wages (rate) * worked days (payable days)",
38
+ condition: "dailyWages > 0 && payableDays > 0",
39
+ monthlyFormula: "round(dailyWages * payableDays, 2)",
40
+ annualFormula: "round(dailyWages * payableDays * 12, 2)",
41
+ };
42
+ // Basic calculation: grossEarnings * 50%
43
+ export const basicGrossEarnings50Rule = {
44
+ ruleCode: "BASIC_GROSS_50",
45
+ name: "Basic (50% Gross)",
46
+ category: "Earning",
47
+ type: "Custom",
48
+ version: "FY2024-2025",
49
+ description: "Basic = grossEarnings * 50%",
50
+ condition: "grossEarnings > 0",
51
+ monthlyFormula: "round(grossEarnings * 0.5, 2)",
52
+ annualFormula: "round(grossEarnings * 0.5 * 12, 2)",
53
+ };
54
+ // Basic calculation: grossEarnings * 40%
55
+ export const basicGrossEarnings40Rule = {
56
+ ruleCode: "BASIC_GROSS_40",
57
+ name: "Basic (40% Gross)",
58
+ category: "Earning",
59
+ type: "Custom",
60
+ version: "FY2024-2025",
61
+ description: "Basic = grossEarnings * 40%",
62
+ condition: "grossEarnings > 0",
63
+ monthlyFormula: "round(grossEarnings * 0.4, 2)",
64
+ annualFormula: "round(grossEarnings * 0.4 * 12, 2)",
65
+ };
@@ -0,0 +1,3 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const bonusRule: Rule;
3
+ export declare const bonusBasicPlusDARule: Rule;
@@ -0,0 +1,23 @@
1
+ // Bonus: Basic * 8.33%
2
+ export const bonusRule = {
3
+ ruleCode: "BONUS",
4
+ name: "Bonus",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Bonus = Basic * 8.33%",
9
+ condition: "basic > 0",
10
+ monthlyFormula: "round(basic * 0.0833, 2)",
11
+ annualFormula: "round(basic * 0.0833 * 12, 2)",
12
+ };
13
+ export const bonusBasicPlusDARule = {
14
+ ruleCode: "BONUS_BASIC_DA",
15
+ name: "Bonus - 8.33% of Basic + DA",
16
+ category: "Earning",
17
+ type: "Custom",
18
+ version: "FY2024-2025",
19
+ description: "Bonus = (Basic + DA) × 8.33%",
20
+ condition: "basicPlusDA > 0",
21
+ monthlyFormula: "round(basicPlusDA * 0.0833, 2)",
22
+ annualFormula: "round(basicPlusDA * 0.0833 * 12, 2)",
23
+ };
@@ -0,0 +1,6 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const conveyanceGrossEarningsRule: Rule;
3
+ export declare const conveyanceFixed1600Rule: Rule;
4
+ export declare const conveyanceDaily23Rule: Rule;
5
+ export declare const conveyanceDaily75Rule: Rule;
6
+ export declare const conveyanceDailyRateRule: Rule;
@@ -0,0 +1,59 @@
1
+ // Conveyance Allowance: grossEarnings * 10%
2
+ export const conveyanceGrossEarningsRule = {
3
+ ruleCode: "CONVEYANCE_GROSS_10",
4
+ name: "Conveyance Allowance - 10% of Gross Earnings",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Conveyance Allowance = grossEarnings * 10%",
9
+ condition: "grossEarnings > 0",
10
+ monthlyFormula: "round(grossEarnings * 0.1, 2)",
11
+ annualFormula: "round(grossEarnings * 0.1 * 12, 2)",
12
+ };
13
+ // Conveyance Allowance: (1600 / working days in month) * payable days
14
+ export const conveyanceFixed1600Rule = {
15
+ ruleCode: "CONVEYANCE_FIXED_1600",
16
+ name: "Conveyance Allowance - Fixed ₹1600",
17
+ category: "Earning",
18
+ type: "Custom",
19
+ version: "FY2024-2025",
20
+ description: "Conveyance Allowance = (1600 rupees / no. of working days in month) * payable days",
21
+ condition: "workingDaysInMonth > 0 && payableDays > 0",
22
+ monthlyFormula: "round((1600 / workingDaysInMonth) * payableDays, 2)",
23
+ annualFormula: "round(((1600 / workingDaysInMonth) * payableDays) * 12, 2)",
24
+ };
25
+ // Conveyance Allowance: payable days * 23.08 rupees
26
+ export const conveyanceDaily23Rule = {
27
+ ruleCode: "CONVEYANCE_DAILY_23",
28
+ name: "Conveyance Allowance - ₹23.08 per day",
29
+ category: "Earning",
30
+ type: "Custom",
31
+ version: "FY2024-2025",
32
+ description: "Conveyance Allowance = payable days * 23.08 rupees",
33
+ condition: "payableDays > 0",
34
+ monthlyFormula: "round(payableDays * 23.08, 2)",
35
+ annualFormula: "round(payableDays * 23.08 * 12, 2)",
36
+ };
37
+ // Conveyance Allowance: payable days * 75 rupees
38
+ export const conveyanceDaily75Rule = {
39
+ ruleCode: "CONVEYANCE_DAILY_75",
40
+ name: "Conveyance Allowance - ₹75 per day",
41
+ category: "Earning",
42
+ type: "Custom",
43
+ version: "FY2024-2025",
44
+ description: "Conveyance Allowance = payable days * 75 rupees",
45
+ condition: "payableDays > 0",
46
+ monthlyFormula: "round(payableDays * 75, 2)",
47
+ annualFormula: "round(payableDays * 75 * 12, 2)",
48
+ };
49
+ export const conveyanceDailyRateRule = {
50
+ ruleCode: "CONVEYANCE_DAILY_RATE",
51
+ name: "Conveyance – Daily Rate (₹31.26)",
52
+ category: "Earning",
53
+ type: "Custom",
54
+ version: "FY2024-2025",
55
+ description: "Conveyance allowance calculated at ₹31.255 per payable day",
56
+ condition: "payableDays > 0",
57
+ monthlyFormula: "round(payableDays * 31.255, 2)",
58
+ annualFormula: "round(payableDays * 31.255, 2)",
59
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const dailyDARule: Rule;
@@ -0,0 +1,11 @@
1
+ export const dailyDARule = {
2
+ ruleCode: "DA",
3
+ name: "Dearness Allowance",
4
+ category: "Earning",
5
+ type: "Custom",
6
+ version: "FY2024-2025",
7
+ description: "Dearness Allowance calculated at a fixed rate of Rs.266 per payable day.",
8
+ condition: "payableDays > 0",
9
+ monthlyFormula: "round(payableDays * 266, 0)",
10
+ annualFormula: "round(payableDays * 266 * 12, 0)",
11
+ };
@@ -0,0 +1,3 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const elRule: Rule;
3
+ export declare const elAllowanceRule: Rule;
@@ -0,0 +1,23 @@
1
+ // EL: Basic * 5%
2
+ export const elRule = {
3
+ ruleCode: "EL",
4
+ name: "EL (Earned Leave Allowance)",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "EL = Basic * 5%",
9
+ condition: "basic > 0",
10
+ monthlyFormula: "round(basic * 0.05, 2)",
11
+ annualFormula: "round(basic * 0.05 * 12, 2)",
12
+ };
13
+ export const elAllowanceRule = {
14
+ ruleCode: "EL_ALLOWANCE",
15
+ name: "Earned Leave Allowance",
16
+ category: "Earning",
17
+ type: "Statutory",
18
+ version: "FY2024-2025",
19
+ description: "EL allowance calculated as 5% of (Basic + Dearness Allowance).",
20
+ condition: "basicPlusDA > 0",
21
+ monthlyFormula: "round(basicPlusDA * 0.05, 0)",
22
+ annualFormula: "round(basicPlusDA * 0.05 * 12, 2)",
23
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const emergencyAllowanceRule: Rule;
@@ -0,0 +1,12 @@
1
+ // Emergency Allowance - Rs. 27.46/- per payable day
2
+ export const emergencyAllowanceRule = {
3
+ ruleCode: "EMERGENCY_ALLOWANCE",
4
+ name: "Emergency Allowance",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Emergency Allowance = Rs. 27.46/- × payable days (worked days)",
9
+ condition: "payableDays > 0",
10
+ monthlyFormula: "round(27.46 * payableDays, 2)",
11
+ annualFormula: "round(27.46 * payableDays * 12, 2)",
12
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const employerESIRule: Rule;
@@ -0,0 +1,11 @@
1
+ export const employerESIRule = {
2
+ ruleCode: "EMPLOYER_ESI",
3
+ name: "Employer ESI Contribution",
4
+ category: "Deduction",
5
+ type: "Statutory",
6
+ version: "FY2024-2025",
7
+ description: "Employer ESI contribution at 3.25% of basic wages, applicable when basic is up to Rs.21,000.",
8
+ condition: "basic > 0",
9
+ monthlyFormula: "round(basic * 0.0325)",
10
+ annualFormula: "round(basic * 0.13, 0) * 12",
11
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const employeerPfRule: Rule;
@@ -0,0 +1,11 @@
1
+ export const employeerPfRule = {
2
+ ruleCode: "EMPLOYEER_PF",
3
+ name: "Employeer Provident Fund",
4
+ category: "Deduction",
5
+ type: "Statutory",
6
+ version: "FY2024-2025",
7
+ description: "PF = 13% of Basic",
8
+ condition: "basic > 0",
9
+ monthlyFormula: "round(basic * 0.13, 0)",
10
+ annualFormula: "round(basic * 0.13, 0) * 12",
11
+ };
@@ -0,0 +1,6 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const esiRule: Rule;
3
+ export declare const ESI_Employee_On_Basic: Rule;
4
+ export declare const ESIRuleOnBasic: Rule;
5
+ export declare const ESI_Employee_On_BasicPlusDA: Rule;
6
+ export declare const leaveAllowanceBasicPlusDARule: Rule;
@@ -0,0 +1,54 @@
1
+ export const esiRule = {
2
+ ruleCode: "ESI_EMPLOYEE",
3
+ name: "Employee State Insurance",
4
+ category: "Deduction",
5
+ type: "Statutory",
6
+ version: "FY2024-2025",
7
+ description: "Employee ESI 0.75% of Gross (if <= ₹21,000)",
8
+ condition: "isEsiApplicable == true && gross <= (esiWageLimit || 21000)",
9
+ monthlyFormula: "round(gross * 0.0075, 2)",
10
+ annualFormula: "round(gross * 0.0075 * 12, 2)",
11
+ };
12
+ export const ESI_Employee_On_Basic = {
13
+ ruleCode: "ESI_EMP_BASIC",
14
+ name: "ESI Employee on Basic",
15
+ category: "Deduction",
16
+ type: "Custom",
17
+ version: "FY2024-2025",
18
+ description: "Employee ESI @ 0.75% calculated on Basic (non-statutory custom model)",
19
+ condition: "basic > 0",
20
+ monthlyFormula: "round(basic * 0.0075, 2)",
21
+ annualFormula: "round(basic * 0.0075 * 12, 2)",
22
+ };
23
+ export const ESIRuleOnBasic = {
24
+ ruleCode: "ESI_RULE_ON_BASIC_WAGE",
25
+ name: "Employee ESIC Contribution",
26
+ category: "Deduction",
27
+ type: "Custom",
28
+ version: "FY2024-2025",
29
+ description: "Employee ESIC contribution calculated at 0.75% of basic wages, applicable only when basic is up to Rs.21,000.",
30
+ condition: "basic <= 21000",
31
+ monthlyFormula: "ceil(basic * 0.0075)",
32
+ };
33
+ export const ESI_Employee_On_BasicPlusDA = {
34
+ ruleCode: "ESI_EMP_BASIC_DA",
35
+ name: "ESI Employee on Basic + DA",
36
+ category: "Deduction",
37
+ type: "Statutory",
38
+ version: "FY2024-2025",
39
+ description: "Employee ESI @ 0.75% calculated on (Basic + DA)",
40
+ condition: "basicPlusDA > 0",
41
+ monthlyFormula: "round(basicPlusDA * 0.0075, 2)",
42
+ annualFormula: "round(basicPlusDA * 0.0075 * 12, 2)",
43
+ };
44
+ export const leaveAllowanceBasicPlusDARule = {
45
+ ruleCode: "LEAVE_ALLOWANCE",
46
+ name: "Leave Allowance - 5% of Basic + DA",
47
+ category: "Earning",
48
+ type: "Custom",
49
+ version: "FY2024-2025",
50
+ description: "Leave Allowance = 5% of (Basic + DA)",
51
+ condition: "basicPlusDA > 0",
52
+ monthlyFormula: "round(basicPlusDA * 0.05, 0)",
53
+ annualFormula: "round(basicPlusDA * 0.05 * 12, 0)",
54
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const extraBasicRule: Rule;
@@ -0,0 +1,11 @@
1
+ export const extraBasicRule = {
2
+ ruleCode: "EXTRA_BASIC_GROSS",
3
+ name: "Extra_Basic",
4
+ category: "Earning",
5
+ type: "Custom",
6
+ version: "FY2024-2025",
7
+ description: "Extra Basic = extraWorkedDays * Daily wages (rate)",
8
+ condition: "extraWorkedDays > 0 && basic > 0",
9
+ monthlyFormula: "round(dailyWages * extraWorkedDays, 2)",
10
+ annualFormula: "round(dailyWages * extraWorkedDays * 12, 2)",
11
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const fuelAllowanceRule: Rule;
@@ -0,0 +1,12 @@
1
+ // Fuel Allowance: 50 * payable days
2
+ export const fuelAllowanceRule = {
3
+ ruleCode: "FUEL_ALLOWANCE",
4
+ name: "Fuel Allowance",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Fuel Allowance Per day Rs. 50 = 50 * payable days",
9
+ condition: "payableDays > 0",
10
+ monthlyFormula: "round(50 * payableDays, 2)",
11
+ annualFormula: "round(50 * payableDays * 12, 2)",
12
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const generalAllowanceRule: Rule;
@@ -0,0 +1,12 @@
1
+ // Allowance: Basic * 13%
2
+ export const generalAllowanceRule = {
3
+ ruleCode: "GENERAL_ALLOWANCE",
4
+ name: "General_Allowancee",
5
+ category: "Earning",
6
+ type: "Custom",
7
+ version: "FY2024-2025",
8
+ description: "Allowance = Basic * 13%",
9
+ condition: "basic > 0",
10
+ monthlyFormula: "round(basic * 0.13, 2)",
11
+ annualFormula: "round(basic * 0.13 * 12, 2)",
12
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const geyserChargeRuleTierA: Rule;
@@ -0,0 +1,11 @@
1
+ export const geyserChargeRuleTierA = {
2
+ ruleCode: "GEYSER_CHARGE",
3
+ name: "Geyser Charge",
4
+ category: "Deduction",
5
+ type: "Fixed",
6
+ version: "FY2024-2025",
7
+ description: "Fixed monthly geyser charge deduction of Rs.91.",
8
+ condition: "true",
9
+ monthlyFormula: "91",
10
+ annualFormula: "91 * 12",
11
+ };
@@ -0,0 +1,8 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const hraRule: Rule;
3
+ export declare const hraGrossEarnings20Rule: Rule;
4
+ export declare const hraBasic10Rule: Rule;
5
+ export declare const hraBasic8Rule: Rule;
6
+ export declare const hraBasic30Rule: Rule;
7
+ export declare const hraOthersRule: Rule;
8
+ export declare const hraDailyRateRule: Rule;
@@ -0,0 +1,82 @@
1
+ export const hraRule = {
2
+ ruleCode: "HRA",
3
+ name: "House Rent Allowance",
4
+ category: "Earning",
5
+ type: "Statutory",
6
+ version: "FY2024-2025",
7
+ description: "HRA: 40% (non-metro) or 50% (metro) of Basic",
8
+ condition: "basic > 0",
9
+ monthlyFormula: "round(basic * (isMetro ? 0.50 : 0.40), 2)",
10
+ annualFormula: "round(basic * (isMetro ? 0.50 : 0.40) * 12, 2)",
11
+ };
12
+ // HRA: grossEarnings * 20%
13
+ export const hraGrossEarnings20Rule = {
14
+ ruleCode: "HRA_GROSS_20",
15
+ name: "HRA - 20% of Gross Earnings",
16
+ category: "Earning",
17
+ type: "Custom",
18
+ version: "FY2024-2025",
19
+ description: "HRA = grossEarnings * 20%",
20
+ condition: "grossEarnings > 0",
21
+ monthlyFormula: "round(grossEarnings * 0.2, 2)",
22
+ annualFormula: "round(grossEarnings * 0.2 * 12, 2)",
23
+ };
24
+ // HRA: Basic * 10%
25
+ export const hraBasic10Rule = {
26
+ ruleCode: "HRA_BASIC_10",
27
+ name: "HRA - 10% of Basic",
28
+ category: "Earning",
29
+ type: "Custom",
30
+ version: "FY2024-2025",
31
+ description: "HRA = Basic * 10%",
32
+ condition: "basic > 0",
33
+ monthlyFormula: "round(basic * 0.1, 2)",
34
+ annualFormula: "round(basic * 0.1 * 12, 2)",
35
+ };
36
+ // HRA: Basic * 8%
37
+ export const hraBasic8Rule = {
38
+ ruleCode: "HRA_BASIC_8",
39
+ name: "HRA - 8% of Basic",
40
+ category: "Earning",
41
+ type: "Custom",
42
+ version: "FY2024-2025",
43
+ description: "HRA = Basic * 8%",
44
+ condition: "basic > 0",
45
+ monthlyFormula: "round(basic * 0.08, 2)",
46
+ annualFormula: "round(basic * 0.08 * 12, 2)",
47
+ };
48
+ // HRA: Basic * 30%
49
+ export const hraBasic30Rule = {
50
+ ruleCode: "HRA_BASIC_30",
51
+ name: "HRA - 30% of Basic",
52
+ category: "Earning",
53
+ type: "Custom",
54
+ version: "FY2024-2025",
55
+ description: "HRA = Basic * 30%",
56
+ condition: "basic > 0",
57
+ monthlyFormula: "round(basic * 0.3, 2)",
58
+ annualFormula: "round(basic * 0.3 * 12, 2)",
59
+ };
60
+ // HRA + Others: payable days * 52.963%
61
+ export const hraOthersRule = {
62
+ ruleCode: "HRA_OTHERS",
63
+ name: "HRA + Others",
64
+ category: "Earning",
65
+ type: "Custom",
66
+ version: "FY2024-2025",
67
+ description: "HRA + Others = payable days * 52.963%",
68
+ condition: "payableDays > 0",
69
+ monthlyFormula: "round(payableDays * 0.52963, 2)",
70
+ annualFormula: "round(payableDays * 0.52963 * 12, 2)",
71
+ };
72
+ export const hraDailyRateRule = {
73
+ ruleCode: "HRA_DAILY_RATE",
74
+ name: "HRA – Daily Rate (₹89.30)",
75
+ category: "Earning",
76
+ type: "Custom",
77
+ version: "FY2024-2025",
78
+ description: "House Rent Allowance calculated at ₹89.30 per payable day",
79
+ condition: "payableDays > 0",
80
+ monthlyFormula: "round(payableDays * 89.3, 2)",
81
+ annualFormula: "round(payableDays * 89.3, 2)",
82
+ };
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const incomeTaxRule: Rule;
@@ -0,0 +1,15 @@
1
+ export const incomeTaxRule = {
2
+ ruleCode: "TDS",
3
+ name: "Income Tax (TDS)",
4
+ category: "Deduction",
5
+ version: "FY2024-2025",
6
+ description: "Simplified annual slab (old regime)",
7
+ condition: "ctc > 250000",
8
+ annualFormula: `
9
+ ctc <= 250000 ? 0 :
10
+ ctc <= 500000 ? (ctc - 250000) * 0.05 :
11
+ ctc <= 1000000 ? (12500 + (ctc - 500000) * 0.20) :
12
+ (112500 + (ctc - 1000000) * 0.30)
13
+ `,
14
+ monthlyFormula: "(ctc <= 250000 ? 0 : (ctc <= 500000 ? (ctc - 250000) * 0.05 : (ctc <= 1000000 ? (12500 + (ctc - 500000) * 0.20) : (112500 + (ctc - 1000000) * 0.30))) ) / 12",
15
+ };
@@ -0,0 +1,38 @@
1
+ export * from "./basicRules";
2
+ export * from "./hraRules";
3
+ export * from "./esiRules";
4
+ export * from "./pfRules";
5
+ export * from "./profTaxRules";
6
+ export * from "./incomeTaxRules";
7
+ export * from "./rfbRules";
8
+ export * from "./specialAllowanceRules";
9
+ export * from "./conveyanceAllowanceRules";
10
+ export * from "./medicalAllowanceRules";
11
+ export * from "./mobileAllowanceRules";
12
+ export * from "./nationalHolidayRules";
13
+ export * from "./optionalHolidayRules";
14
+ export * from "./earnedleaveRules";
15
+ export * from "./bonusRules";
16
+ export * from "./localAllowanceRules";
17
+ export * from "./leaveAllowanceRules";
18
+ export * from "./retentionBonusRules";
19
+ export * from "./fuelAllowanceRules";
20
+ export * from "./otherAllowanceRules";
21
+ export * from "./retrenchmentRules";
22
+ export * from "./additionalAllowanceRules";
23
+ export * from "./otherPaidHolidayRules";
24
+ export * from "./teaAllowanceRules";
25
+ export * from "./generalAllowanceRules";
26
+ export * from "./shiftAllowanceRules";
27
+ export * from "./washingAllowanceRules";
28
+ export * from "./uniformAllowanceRules";
29
+ export * from "./safetyAllowanceRules";
30
+ export * from "./emergencyAllowanceRules";
31
+ export * from "./acChargesRules";
32
+ export * from "./geyserAllowanceRules";
33
+ export * from "./quarterRentRules";
34
+ export * from "./extraBasicRules";
35
+ export * from "./dearnessAllowanceRules";
36
+ export * from "./otherDeductionsRule";
37
+ export * from "./overTimesRules";
38
+ export * from "./jaggeryAllowanceRule";
@@ -0,0 +1,38 @@
1
+ export * from "./basicRules";
2
+ export * from "./hraRules";
3
+ export * from "./esiRules";
4
+ export * from "./pfRules";
5
+ export * from "./profTaxRules";
6
+ export * from "./incomeTaxRules";
7
+ export * from "./rfbRules";
8
+ export * from "./specialAllowanceRules";
9
+ export * from "./conveyanceAllowanceRules";
10
+ export * from "./medicalAllowanceRules";
11
+ export * from "./mobileAllowanceRules";
12
+ export * from "./nationalHolidayRules";
13
+ export * from "./optionalHolidayRules";
14
+ export * from "./earnedleaveRules";
15
+ export * from "./bonusRules";
16
+ export * from "./localAllowanceRules";
17
+ export * from "./leaveAllowanceRules";
18
+ export * from "./retentionBonusRules";
19
+ export * from "./fuelAllowanceRules";
20
+ export * from "./otherAllowanceRules";
21
+ export * from "./retrenchmentRules";
22
+ export * from "./additionalAllowanceRules";
23
+ export * from "./otherPaidHolidayRules";
24
+ export * from "./teaAllowanceRules";
25
+ export * from "./generalAllowanceRules";
26
+ export * from "./shiftAllowanceRules";
27
+ export * from "./washingAllowanceRules";
28
+ export * from "./uniformAllowanceRules";
29
+ export * from "./safetyAllowanceRules";
30
+ export * from "./emergencyAllowanceRules";
31
+ export * from "./acChargesRules";
32
+ export * from "./geyserAllowanceRules";
33
+ export * from "./quarterRentRules";
34
+ export * from "./extraBasicRules";
35
+ export * from "./dearnessAllowanceRules";
36
+ export * from "./otherDeductionsRule";
37
+ export * from "./overTimesRules";
38
+ export * from "./jaggeryAllowanceRule";
@@ -0,0 +1,2 @@
1
+ import { Rule } from "../../utils/types";
2
+ export declare const jaggeryAllowanceRule: Rule;