Skip to content

Commit

Permalink
fix validation of rodne cislo
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekVigas committed Feb 7, 2024
1 parent bb5d99a commit 56ef6be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/calculation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const mapPartnerChildBonus = (input: ChildrenUserInput) => {

return {
priezviskoMeno: input.r034_priezvisko_a_meno,
rodneCislo: input.r034_rodne_cislo.replace(/\D/g, ''),
rodneCislo: input.r034_rodne_cislo ? input.r034_rodne_cislo.replace(/\D/g, '') : '',
m00: wholeYear,
m01: !wholeYear && monthFrom === 0,
m02: !wholeYear && monthFrom <= 1 && monthTo >= 1,
Expand Down

0 comments on commit 56ef6be

Please sign in to comment.