Skip to content

taxcalcs/taxjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4732fd8 · Mar 21, 2023

History

43 Commits
Dec 21, 2022
Mar 21, 2023
Mar 21, 2023
Dec 21, 2022
Nov 10, 2021
Jan 1, 2021
Dec 21, 2022
Nov 10, 2021
Mar 21, 2023
Mar 21, 2023
Nov 10, 2021
Nov 10, 2021

Repository files navigation

TaxJs Node.js CI CodeQL NPM

TaxJs is a typescript and javascript library to calculate german tax.

The code is generated from pseudo code from https://www.bmf-steuerrechner.de/

Test page: https://taxcalcs.github.io/taxjs-test/

Usage

let tax = new Lohnsteuer2021Big();
tax.initInputs();

tax.setLZZ(2); // Lohnzahlungszeitraum
tax.setKVZ(1.3); // Einkommensbezogener Zusatzbeitragssatz
tax.setSTKL(1); // Steuerklasse
tax.setPVZ(1); // Zuschlag soziale Pflegeversicherung
tax.setRE4(new Big(1234500)); // Steuerpflichtiger Arbeitslohn in Cent

tax.calculate();

tax.getLSTLZZ().toNumber(); // Lohnsteuer in Cent

You can find all fields on the test page.

Dependencies

As replacement for the Java BigDecimal class the library big.js and the typescript definition @types/big.js are used.

Development

For convert xslt file into xslt sef file you have to install xslt3.

npm install -g  xslt3

and

npm run compile-xsl

For compile typscript into javascript you have to install typescript.

npm install -g  typescript