Commit b2b8dea6 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix unearned premiums (factor was calculated with the wrong logic)

parent e01a4b05
......@@ -1209,7 +1209,7 @@ InsuranceTarif = R6Class(
freq = params$ContractData$premiumFrequency
bm = month(params$ContractData$contractClosing)
fact = (month(factors$date) - bm + 12 + 1) %% (12/freq) * (freq/12)
fact = (bm - month(factors$date) + 12 - 1) %% (12/freq) * (freq/12)
}
# TODO: We have no vector of actual written premiums (implicit assumption
# seems to be that the premium stays constant!). Once we have such a vector,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment