Skip to content

Commit

Permalink
Merge branch 'master' into 786-upozornenie-ze-danovnik-sa-moze-stat-p…
Browse files Browse the repository at this point in the history
…latcom-preddavkov-na-dan
  • Loading branch information
MarekVigas authored Oct 7, 2023
2 parents 3ca8a76 + 44b56d5 commit a16696b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/lib/calculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ export function calculate(input: TaxFormUserInput): TaxForm {
},

get r034a() {
return input.r034a
if (input.hasChildren && !input.prijmyPredJul22) {
return `${input.zaciatokPrijmovDen}.${input.zaciatokPrijmovMesiac}.${input.zaciatokPrijmovRok}`
}
return ''
},

/** SECTION Mortgage NAMES ARE WRONG TODO*/
Expand Down
6 changes: 0 additions & 6 deletions src/pages/deti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ const Deti: Page<ChildrenUserInput> = ({
...childrenUserInputInitialValues,
hasChildren: false,
}
userInput = values.prijmyPredJul22
? userInput
: {
...userInput,
r034a: `${values.zaciatokPrijmovDen}.${values.zaciatokPrijmovMesiac}.${values.zaciatokPrijmovRok}`,
}
setTaxFormUserInput(userInput)
router.push(nextRoute)
}}
Expand Down
1 change: 0 additions & 1 deletion src/types/PageUserInputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export type ChildrenUserInput = Pick<
| 'hasChildren'
| 'children'
| 'prijmyPredJul22'
| 'r034a'
| 'zaciatokPrijmovDen'
| 'zaciatokPrijmovMesiac'
| 'zaciatokPrijmovRok'
Expand Down

0 comments on commit a16696b

Please sign in to comment.