payroll-rules-india 1.0.0 → 1.0.1

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.
@@ -1,2 +1,3 @@
1
1
  import { Rule } from "../../utils/types";
2
- export declare const pfRule: Rule;
2
+ export declare const pfBasicRule: Rule;
3
+ export declare const pfBasicDaRule: Rule;
@@ -1,14 +1,24 @@
1
- export const pfRule = {
2
- ruleCode: "PF_EMPLOYEE",
3
- name: "Provident Fund (Employee)",
1
+ // PF: min(Basic, 15000) * 0.12
2
+ export const pfBasicRule = {
3
+ ruleCode: "PF_BASIC",
4
+ name: "Provident Fund (Employee) - Basic Only",
4
5
  category: "Deduction",
5
6
  type: "Statutory",
6
7
  version: "FY2024-2025",
7
- description: "Employee contribution to Provident Fund — 12% of (Basic + HRA) if above ₹15,000, otherwise 12% of ₹15,000.",
8
- // Apply only if PF is applicable
9
- condition: "isPfApplicable == true && (basic + hra) > 0",
10
- // Monthly formula
11
- monthlyFormula: "(basic + hra) > 15000 ? round((basic + hra) * 0.12, 2) : round(15000 * 0.12, 2)",
12
- // Annual formula (12x monthly)
13
- annualFormula: "(basic + hra) > 15000 ? round((basic + hra) * 0.12 * 12, 2) : round(15000 * 0.12 * 12, 2)",
8
+ description: "Employee contribution to Provident Fund — 12% of Basic (capped at ₹15,000).",
9
+ condition: "isPfApplicable == true && basic > 0",
10
+ monthlyFormula: "round(min(basic, 15000) * 0.12, 2)",
11
+ annualFormula: "round(min(basic, 15000) * 0.12 * 12, 2)",
12
+ };
13
+ // PF: min(Basic + DA, 15000) * 0.12
14
+ export const pfBasicDaRule = {
15
+ ruleCode: "PF_BASIC_DA",
16
+ name: "Provident Fund (Employee) - Basic + DA",
17
+ category: "Deduction",
18
+ type: "Statutory",
19
+ version: "FY2024-2025",
20
+ description: "Employee contribution to Provident Fund — 12% of (Basic + DA) if above ₹15,000, otherwise 12% of ₹15,000.",
21
+ condition: "isPfApplicable == true && (basic + da) > 0",
22
+ monthlyFormula: "round(min(basic + da, 15000) * 0.12, 2)",
23
+ annualFormula: "round(min(basic + da, 15000) * 0.12 * 12, 2)",
14
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payroll-rules-india",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Custom and statutory payroll rules engine for India salary calculations.",
5
5
  "author": "Yogesh c",
6
6
  "license": "MIT",