Skip to content

Commit

Permalink
fix SV values for 2025, update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bettysteger committed Jan 7, 2025
1 parent ff110bf commit a5612d3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/sv-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export const percentages = {
// @see https://www.svs.at/cdscontent/?contentid=10007.846813&portal=svsportal
export const fixValues = {
2025: {
uv: 11.35, // TODO: check value in 2025
uv: 12.07,
kvMinBeitragsgrundlage: 551.10,
pvMinBeitragsgrundlage: 551.10,
svsMinBeitragsgrundlage: 551.10,
maxBeitragsgrundlage: 7525,
limit: 6439.03 // TODO: check value in 2025
limit: 6613.2
},
2024: {
uv: 11.35, // monatlich in € Unfallversicherung
Expand Down
23 changes: 19 additions & 4 deletions tests/est.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
import { einkommensteuer, freibetragValues, investGewinnfreibetrag } from '../src/est.js';

test('should return 0 for 0-12816 income', () => {
expect(einkommensteuer(0, 2024)).toBe(0);
expect(einkommensteuer(12816, 2024)).toBe(0);
expect(einkommensteuer(12817, 2024)).not.toBe(0);
test('should return 0 for 0-13308 income', () => {
expect(einkommensteuer(0, 2025)).toBe(0);
expect(einkommensteuer(13308, 2025)).toBe(0);
expect(einkommensteuer(13309, 2025)).not.toBe(0);
});

test('should return correct ESt for all levels in 2025', () => {
const limits = [13308, 21617, 35836, 69166, 103072, 1000000];
const percentages = [0, 0.2, 0.3, 0.4, 0.48, 0.5, 0.55];
const levels = limits.map((limit, index) => {
return {
limit,
est: (limit - (index > 0 ? limits[index-1] : 0)) * percentages[index]
};
});
levels.forEach((level, i) => { level.est += (levels[i-1] ? levels[i-1].est : 0); });
levels.forEach((level) => {
expect(einkommensteuer(level.limit, 2025)).toBe(level.est);
});
});

test('should return correct ESt for all levels in 2024', () => {
Expand Down
13 changes: 9 additions & 4 deletions tests/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import hundert11 from '../src/index.js';
import { fixValues } from '../src/sv-values.js';
import { freibetragValues } from '../src/est.js';

// Wenn man weniger als 5.710,32 € Gewinn pro Jahr erzielt, kann man
// sich bei der SVA von der KV+PV ausnehmen lassen. Man bezahlt dann nur die UV.
Expand Down Expand Up @@ -46,8 +47,10 @@ test('should return the correct SV-Nachzahlung for 10.000€ (year = founding ye
let income = 10000;
let outgo = 1200;
let { sv, svAdditional } = hundert11.calculate(income, outgo, options);
expect(sv).toBe(1805); // values from WKO SV-Beitrag Rechner
// expect(svAdditional).toBe(240);
const haudeSvValues = [1805, 429]; // values from WKO & haude Rechner
// both values from https://www.ea-tabelle.at/?from=2548
expect(sv).toBe(haudeSvValues[0]);
// expect(svAdditional).toBe(haudeSvValues[1]);
});

test('should add tipp to exclude KV/PV if profit is smaller than 5.710,32', () => {
Expand Down Expand Up @@ -91,13 +94,15 @@ test('should return zero maxInvestFreibetrag because of 33.000 limit', () => {
test('should return correct maxInvestFreibetrag for 2024', () => {
let income = 833000;
let outgo = 200000;
const grundfreibetrag = 4950;
const { grundfreibetrag } = freibetragValues(2024); // = 4950
expect(grundfreibetrag).toBe(4950);
expect(hundert11.calculate(income, outgo).maxInvestFreibetrag).toBe(46400 - grundfreibetrag);
});

test('should return correct maxInvestFreibetrag for 2023', () => {
let income = 833000;
let outgo = 200000;
const grundfreibetrag = 4500;
const { grundfreibetrag } = freibetragValues(2023); // = 4500
expect(grundfreibetrag).toBe(4500);
expect(hundert11.calculate(income, outgo, {year: 2023}).maxInvestFreibetrag).toBe(45950 - grundfreibetrag);
});

0 comments on commit a5612d3

Please sign in to comment.