Download the PHP package crmleaf/pf-calculator without Composer
On this page you can find all versions of the php package crmleaf/pf-calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download crmleaf/pf-calculator
More information about crmleaf/pf-calculator
Files in crmleaf/pf-calculator
Package pf-calculator
Short Description EPF employee, employer and EPS shares with the wage ceiling applied.
License MIT
Homepage https://www.indpayroll.com/free-tools/pf-calculator
Informations about the package pf-calculator
PF Calculator
EPF employee, employer and EPS shares with the wage ceiling applied.
Splits the 12% employer share into EPS and EPF the way EPFO does it, applies the wage ceiling only where the statute applies it, and adds EDLI and administration charges.
One of the CRMLeaf payroll tools. The arithmetic
and the dated statutory rate tables live in
crmleaf/payroll-core; this package is
the thin skin that makes one calculator installable, mountable and embeddable on
its own.
[!NOTE] A wrong figure or an out-of-date rate is almost always a
payroll-corematter, since that is where the tables live. Anything about this tool's routes, views or browser asset belongs here.
Install
Composer - Laravel auto-discovers the service provider, so this is the whole setup:
npm - the same calculation, re-exported from @crmleaf/payroll-js so you can
install this one tool and nothing else:
[!NOTE] Not on npm yet. The script-tag route below needs no registry and works today. Installing this package straight from git will not resolve
@crmleaf/payroll-js, which is not published yet either.
A plain script tag - no build step, no bundler, no server. Build the browser bundle once and serve the file yourself:
payroll.min.js is the single-file browser build. Get it by running
npm run build in @crmleaf/payroll-js and copying dist/payroll.min.js
into whatever your site serves as static assets.
A hosted CDN build is coming soon, which will reduce this to a single URL. Serving the file yourself works today and keeps working afterwards - it is the only option that needs no third-party request, so plenty of projects will want to stay on it.
See it working first
demo/index.html in this repository is a working copy of PF Calculator in one file:
the form, the calculation and the working, with no build step and no server. Drop
payroll.min.js beside it and open it from disk.
Nothing on that page reaches the network, which is the point: it is a calculator people paste salary figures into.
Use it
Plain PHP, no framework and no container:
Laravel - resolve it from the container, or type-hint it anywhere:
Blade - one component, no controller:
HTTP - off by default. Publish the config and turn the route on:
The JSON response carries the figures, the working and the statutory citations:
JavaScript:
No server needed
The maths here is arithmetic over versioned rate tables, so it runs anywhere. The published asset binds the markup and computes in the browser:
If the browser build is absent the script does nothing and the form posts to the server instead, so the page works either way.
Inputs
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
basic_salary |
money (₹) | Yes | 30000 |
|
employer_restricts_to_ceiling |
boolean | No | true |
|
eps_eligible |
boolean | No | true |
A member who joined after 1 September 2014 above the ceiling is not. |
age |
integer | No | - | Past 58, the EPS share stops and the whole employer contribution goes to EPF. |
reduced_rate |
boolean | No | false |
|
include_admin_charges |
boolean | No | true |
|
as_of |
date (YYYY-MM-DD) | No | - |
Optional fields you leave out are omitted from the call entirely, so the calculator's own documented defaults apply.
Every figure here rests on a statutory rate, so the call takes as_of. Set it
and the calculation runs on the rates in force on that date, which is what makes
a prior year recomputable rather than merely rememberable.
Statutory basis
Employees' Provident Funds and Miscellaneous Provisions Act 1952, with the EPS share capped at the ₹15,000 wage ceiling under paragraph 11(3) of the Employees' Pension Scheme 1995 even where EPF is contributed on the full basic.
Rates are data, not code: they live in dated tables with a cited source in
crmleaf/payroll-core, so a rate change is a new dated entry rather than an edit
to a constant.
[!IMPORTANT] This package implements our reading of the applicable statutes and is provided without warranty. It is a calculation library, not tax advice. Verify against your own compliance obligations before relying on the output for statutory filing.
Publishing
| Tag | Publishes |
|---|---|
pf-calculator-config |
config/pf-calculator.php |
pf-calculator-views |
resources/views/vendor/pf-calculator |
pf-calculator-assets |
public/vendor/pf-calculator |
Licence
MIT © CRMLeaf. Use it commercially, embed it, fork it.