UNPKG

@dlivr.io/salary-calculator-egypt

Version:

Javascript SDK for calculating Net/Gross salary in Egypt.

63 lines (47 loc) 1.43 kB
# Welcome to DlivrIO ## Installation ```bash yarn add @dlivr.io/salary-calculator-egypt # or npm install --save @dlivr.io/salary-calculator-egypt ``` ## Usage ### Calculate net salary using gross salary ```javascript import { calculateNetSalary } from "@dlivr.io/salary-calculator-egypt"; const [ netSalary, { insuranceWage, socialInsuranceWorkerShare, salaryTax, martyrsFamiliesFunds, netSalary, grossSalary, socialInsuranceEmployerShare, totalDeduction, }, ] = calculateNetSalary({ grossSalary: 12472, bonus: 0, deduction: 0, lawYear: LawYear.TWENTY_TWO }); ``` ### Calculate gross salary using net salary ```javascript import { calculateGrossSalary } from "@dlivr.io/salary-calculator-egypt"; const [ grossSalary, { insuranceWage, socialInsuranceWorkerShare, salaryTax, martyrsFamiliesFunds, netSalary, grossSalary, socialInsuranceEmployerShare, totalDeduction, }, ] = calculateGrossSalary({ netSalary: 8000, bonus: 0, deduction: 0, lawYear: LawYear.TWENTY_TWO }); ``` ## Contribution All contributions are welcome. To contribute please open a PR [here](https://github.com/dlivr-io/salary-calculator).<br /> Please, do not forget to test your code and run `npm test` before opening a PR. ## Lisence [MIT](https://choosealicense.com/licenses/mit/)