Skip to content

Commit

Permalink
Lagt til et par nye sjablon-funksjoner (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsOttoHaugen authored Feb 23, 2024
1 parent c12a140 commit e7f7f65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,5 +400,7 @@ enum class SjablonTallNavn(

companion object {
fun from(search: String): SjablonTallNavn = requireNotNull(entries.find { it.navn == search }) { DUMMY }

fun fromId(search: String): SjablonTallNavn = requireNotNull(entries.find { it.id == search }) { DUMMY }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ fun opprettDelberegningreferanse(
type: Grunnlagstype,
periode: ÅrMånedsperiode,
) = "delberegning_${type}_${periode.fom.toCompactString()}"

fun opprettSjablonreferanse(
navn: String,
periode: ÅrMånedsperiode,
) = "sjablon_${navn}_${periode.fom.toCompactString()}"

0 comments on commit e7f7f65

Please sign in to comment.