Skip to content

Commit

Permalink
fix child bonus calc for basic scenarios (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekVigas authored Dec 31, 2023
1 parent f96ce63 commit 7bca822
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib/calculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const MIN_PRIJEM_NA_DANOVY_BONUS_NA_DIETA = 3876
const MAX_ZAKLAD_DANE = 21_754.18
export const PARTNER_MAX_ODPOCET = 4500.86

export const CHILD_RATE_EIGHTEEN_AND_YOUNGER = 50
export const CHILD_RATE_EIGHTEEN_AND_OLDER = 140
export const CHILD_RATE_EIGHTEEN_AND_YOUNGER = 140
export const CHILD_RATE_EIGHTEEN_AND_OLDER = 50

const ZIVOTNE_MINIMUM_44_NASOBOK = 10_314.48

Expand Down Expand Up @@ -409,9 +409,6 @@ export function calculate(input: TaxFormUserInput): TaxForm {
return new Decimal(0)
}
const zakladDane = this.r038.plus(this.r045)
// const polovicaZakladuDane = zakladDane.times(0.5)

const zakladPreBonus = zakladDane

return [
Months.January,
Expand All @@ -429,7 +426,7 @@ export function calculate(input: TaxFormUserInput): TaxForm {
].reduce((previusSum, currentMonth) => {
const pocetDeti = getPocetDetivMesiaci(this.r033, currentMonth)
const percentLimit = getPercentualnyLimitNaDeti(pocetDeti)
const mesacnyLimit = zakladPreBonus.dividedBy(6).times(percentLimit)
const mesacnyLimit = zakladDane.dividedBy(12).times(percentLimit)

const skutocnyVysledok = this.r033.reduce(
(previousSum, currentChild) => {
Expand Down

0 comments on commit 7bca822

Please sign in to comment.