Skip to content

Instantly share code, notes, and snippets.

@mCzolko
Created February 19, 2024 10:46
Show Gist options
  • Save mCzolko/74ebf9a23d8734685ebfa566c96fec5e to your computer and use it in GitHub Desktop.
Save mCzolko/74ebf9a23d8734685ebfa566c96fec5e to your computer and use it in GitHub Desktop.
Výpočet daně, socka a zdrávka pro rok 2024 (po reformě)
export class OSVC {
public readonly percentageDiscount = 0.6
constructor(public readonly expectedIncome: number) {}
get totalExpenses(): number {
return this.healthInsurance + this.socialInsurance + this.taxes
}
get netIncome(): number {
return this.expectedIncome - this.totalExpenses
}
get taxableIncome(): number {
if (this.expectedIncome < 2000000) {
return this.expectedIncome * this.percentageDiscount
}
return this.expectedIncome - 2000000 * this.percentageDiscount
}
get taxes(): number {
return this.taxableIncome * 0.15
}
get socialInsurance(): number {
return this.taxableIncome * 0.55 * 0.292
}
get healthInsurance(): number {
return this.taxableIncome * 0.50 * 0.135
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment